Example S32K144 FlexCAN0 RXFIFO DMA nonSDK S32DS13

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Example S32K144 FlexCAN0 RXFIFO DMA nonSDK S32DS13

Example S32K144 FlexCAN0 RXFIFO DMA nonSDK S32DS13

********************************************************************************
Detailed Description:

Configures the FlexCAN 0 to transmit and receive message into RXFIFO.
LOOPBACK mode is enabled.
Two IDs are set into RXFIFO ID table.
DMA is configured to read the message from RXFIFO.
Within DMA major interrupt the new message is send according to
which Identifier Acceptance Filter was hit.

------------------------------------------------------------------------------
 Test HW:         S32K144 EVB-Q100
 MCU:             PS32K144HFVLL 0N77P
 Fsys:            160MHz
 Debugger:        Lauterbach
 Target:          internal_FLASH

********************************************************************************
Revision History:
1.0     Sep-4-2017     Petr Stancik    Initial Version
*******************************************************************************

标签 (1)
附件
评论

如果接收到的CAN数据全部用DMA存到一个数组[120]中保存,DMA如何配置才能确保不会传输越界[120],不能用中断的处理方式,如果用中断来处理,DMA就没什么意义了

Hi,

    I am trying to do CAN using DMA in the s32K144 Eval kit. Softyware triggered DMA works fine but it is not working fine when I configured it for CAN RX FIFO. No DMA major loop complete interrupt is received. I am using SDK's and processor expert generated code to initialize the CAN and DMA. Did you have sample code with SDK's? The attached code is not working for me...it is entering the default ISR.

I have the same problem as you. Have you solved it yet

solved after aligning the CAN software buffer memory.

union
{
 uint8_t buffer[64];
 struct
 {
  uint32_t Buff1;
  uint32_t Buff2;
  uint32_t Data1;
  uint32_t Data2;
 }MBS[8];
}CAN_RxData __attribute__((aligned(64)));;

where did you added the above code ..I am also facing the same issue 

无评分
版本历史
最后更新:
‎09-04-2017 02:54 AM
更新人: