AUTOSAR 面试topics小结

OS:

OS has 4 levels in AUTOSAR, timing protection(任务执行时间监测) and memory protection(防护未授权软件访问相关内存)

ALARM: comes from the hardware timer, could be used to set an event or trigger a callback function

Basic Task: suspend, ready, run

Extended Task:   Have a wait status, which could wait for a certain event 

Interrupt:

Category 1: could not use OS service, will continue the instruction before the interrupt

Category 2: could use some of OS service, OS scheduler will reschedule the task just after the interrrupt. (如果我们在Category 2里面去active了一个更高优先级的task2,那么在ISR结束时 task2会开始运行,而不是回到 task1)

IOC:  communication crossing cores

OS resouce: shared memory between tasks, like semophore or mutex   【什么情况下会发生死锁】

exclusive area: OS里面的概念,对每个模块的各个exclusive area,可以声明是block all interrupt 还是 block 某一部分 或者NONE。 因为在实际的情况下,我们发现COM模块的exclusive area会经常block APPL 10kHZ主算法的 ISR,导致最终频率只有不到10KHZ。 因此,根据mentor自带的COM模块的getting start.pdf,update COM模块exclusive area为NONE后,该问题解决【讲道理APPL的主算法的ISR一定是优先级最高,所以exclusive area的调整很重要】

CAN Stack:

Com:

COM is between RTE and PDUR

  • Provide Signal data to RTE
  • Pakage the Signal data from RTE to PDU for transmission
  • Byte order convertion (big / little endian for the multi-byte signal

PDUR:

PDUR routing the PDU between different modules as user pre-configuration:

PduR will send out the i-PDU from COM to CanIf or LinIf,  or routing the PDU from DCM to CanTp 【I checked the code, most of the function is Macro】

CanIf:

after import dbc file

  • CanIf maps the upper layer PDU into CAN HOH of each corresponding CAN controller in transmit side
  • CanIf extract the PDU from the CAN frame based on the CAN ID

CAN MCAL:   

用的是 polling mode 而不是 interrupt   (选择 can mainfunction 是被 SchM调用还是被ISR调用) 【SchM use the concept of AUTOSAR OS Task to trigger each BSW main function】

Sample point 80%

HOH: Hardware abstration by Hardware object handle (HOH), One HOH represents one message buffer of a Can controller (CAN channel), CanIf maps PDU to HOH

HOH 有 full CAN 和 basic CAN 两种,主要区别在于 FULL CAN用 hardware 做 ID filtering, 而basic CAN用的是 CPU做 filtering   Difference between Full CAN and Basic CAN Mailbox ... - Infineon Developer Community 

UDS Stack:

DCM:

Receive the diagnostic information from PDUR

implement / trigger the UDS service define in ISO-14229 while retrieve the request message

independent from network

DEM:

  • process diagnostic event reported from BSW and APPL
  • Communicate with NvM to store the fault data into Flash 【DEM里面 DTC attribute 下面会去选择Memory destination,这个就是在选NvM里面配置好的分区】【在做routine control的时候callback函数里面也用到了 NvM 的API去存储data】
  • provide the access of fault data to DCM

Debouncing: pre-pass / pre-fail, still in pending status   counter based deboucing(每次调用Dem_SetEvent, counter 就会加1) or time based debouncing, we use counter based deboucing in current project

Aging:基本都是 counter based, 当前项目没启用,因为客户好像没要求

Status byte:  Operation cycle【power on cycle, ignition cycle】, confirmed DTC

Extended data  / FreezeFrame

CanTp:

Segment data in transmit direction

reassemble data in receving direction

Control data flow

PCI: protocol control Information

Single frame

First frame(length of the multi-frame package and intial data) + Consecutive frame (subsequent data of multi-frame message

Flow control:  response from the receiver, acknoloegde of the first frame, also including the STmin (seperation time, mininum delay time between frames)

N_Ar Br Cr, N_As Bs Cs

Physcial addressing (send to a specific CAN node)and functional addressing(broadcast to the whole CAN network)

Bootloader:

bootloader之前需要用到的UDS服务 【通过programming session触发ecu reset进入BootLoader,但在这之前需要调用UDS服务做一些准备工作】

0x10 03    to extended session

0x85 02   turn off DTC storage      因为在关掉communication以后,会出现很多DTC,所以直接关掉

0x28 01   turn off communication control (用来留出带宽给BootLoader上传/下载程序)        关掉01 Normal Communication,保留02 NM message

         

  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值