KDS, Kinetis KE06, Hard Fault when Tx and Rx CAN data

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KDS, Kinetis KE06, Hard Fault when Tx and Rx CAN data

Jump to solution
818 Views
bitjockey
Contributor II

Erich,

I am developing on a FRDM-KE06 board using KDS and also using PE to generate low level code for a design I am working on. I have the MSCAN module set up to interrupt for CAN Receives, but not Transmits. I currently have the CAN filters set to receive all messages. If I just receive CAN messages everything seems fine. If I add code to periodically Transmit a CAN message then I get a Hard Fault and it looks like the PE generated read of the receive frame is where it is exiting via the hard fault. I don't remember having any such issues when coding on a HCS12 part. I looks to me like the MSCAN hardware is the same for both. Any ideas??

Brian

0 Kudos
1 Solution
533 Views
bitjockey
Contributor II

Erich,

          Figured out my issue, in my CAN Rx interrupt the structure pointer passed into CAN1_Read was pointing at the CAN Tx Structure which was caused a fault when CAN1_Read was writing to the structure.....

Regards,

View solution in original post

0 Kudos
2 Replies
533 Views
BlackNight
NXP Employee
NXP Employee

Hi Brian,

last time when I was dealing with CAN was probably three years ago, and I have never used it on any Kinetis devices. So not sure if I can be of any help for your here :-(

Erich

0 Kudos
534 Views
bitjockey
Contributor II

Erich,

          Figured out my issue, in my CAN Rx interrupt the structure pointer passed into CAN1_Read was pointing at the CAN Tx Structure which was caused a fault when CAN1_Read was writing to the structure.....

Regards,

0 Kudos