S32K116 FlexCan TxFrame MB corrupted after wakeup from PN

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

S32K116 FlexCan TxFrame MB corrupted after wakeup from PN

639 Views
francoisdugue
Contributor III

Hi all

I'm working on S32K116, with S32DS3.4.1 and RTM.4.0.2

I'm trying implement some low power mode with 500kbps CAN network.

FlexCan is configured to use MessageBuffer and Pretended Network. Filters are configured.

I use LPIT to schedule the send of can frames using message bugger

Inside te main loop, i request to go to sleep (STOP_1).

My issue :

Corrupted Frames ID are sent from the part if there too mush load (1ms) on the bus fo frames with an ID which is not part of the filters... 

 

Basically, i'am using :

  • in LPIT interrupt: FLEXCAN_DRV_ConfigTxMb(); FLEXCAN_DRV_Send()
  • in FlexCan CallBack : FLEXCAN_DRV_GetWMB() or FLEXCAN_DRV_Receive()
  • in idle: POWER_SYS_SetMode()

Is there some thing to know/do about Message Buffer usage when we return-from/go-to stop mode ?

 

 

0 Kudos
4 Replies

617 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

from the description it is not so clear to me what is corrupted and what situation does an issue happen at. So the MB content used for TX is corrupted after wakeup and thus wrong frame ID is send. Even if FLEXCAN_DRV_ConfigTxMb(); FLEXCAN_DRV_Send() are used so MB is prepared before sending? And the condition is high bus load, so external nodes are sending messages oftenly (1ms) or S32k116 is doing that before going to sleep?

Generally before going to low power mode it is ideally to have no communication, at least do not have prepared TX MB for transmission. Then request low power mode.
After wakeup, you should check MCR[LPM_ACK] to be negated before performing any access to FlexCAN.

BR, Petr

0 Kudos

610 Views
francoisdugue
Contributor III

Hi PetrS,

I understand that my previous post is not clear enought ^^. ok, let me try to clarify.

First, what's working.

  • I'm using USB/CAN device to analyse and simulate 500kbps CAN network (full extended-ids).
  • LPIT generate interrupt each 1ms. It use to manage a can TX via MB functions (sdk RTM4.0.2).
  • FlexCan Rx is ok and filters are also ok.
  • in the main for loop, the request to stop1 works fine.
  • In stop mode, wake-up from LPIT is ok.
  • In stop mode, wake-up from CAN (PN enabled & filter configured) is ok.
  • In stop mode, no wake-up from wrong-IDs : it work.

From this situation.

  • if you load can bus with good IDs from run time, there is no issue. They are catched during the "awake" phase to the program.
  • if you load can bus with good IDs from PN filter, there is no issue.
  • If you load can bus with wrong IDs from both filters (x20 in my case), the FlexCan can send corrupted ID.

I have done some test using an unique and contant tx frame, instead of sending  the can id 0x18ceebeb, it can send randomly 0x180000eb...Payload seems to not be impacted.

 

0 Kudos

604 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

OK thanks for more info, so could you share your simplified project showing this behavior, together with description what/how is sent from CAN tool, so we can reproduce an issue on the EVB?

BR, Petr

0 Kudos

600 Views
francoisdugue
Contributor III

Hi, thank you again for your support.

ok. I'll made a simpler project than actual because it contain some other stuff.

I'll try to reproduce and give you feedback etc.

Regards.

 

0 Kudos