- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
S32k312
This is my code.时间是100MS循环发送,为什么发送一会会出现FLEXCAN_STATUS_TIMEOUT or FLEXCAN_STATUS_BUSY 是哪里有问题,还是我这样发送不正确。
Solved! Go to Solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
those statuses may indicate previously used MB for transmission does not have successfully message transmitted. You can check ECR,ESR1 registers to know if any error is detected.
Also it would be better to do not use FIRC as CAN protocol clock, used rather FXOSC or PLL running from XOSC.
Also it could be due to a way you are using MBs. You defined 16 MBs to be used in you FlexCAN config. Then 11 are configured for reception, not sure which one. For transmitting you are testing status of first 32 MBs (MBs 0-31). This does not make much sense. Test just remaining MBs from those 16 MBs enabled, or better only those used for transmission.
You can also try to extend timeout value in blocking function.
BR, Petr


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
those statuses may indicate previously used MB for transmission does not have successfully message transmitted. You can check ECR,ESR1 registers to know if any error is detected.
Also it would be better to do not use FIRC as CAN protocol clock, used rather FXOSC or PLL running from XOSC.
Also it could be due to a way you are using MBs. You defined 16 MBs to be used in you FlexCAN config. Then 11 are configured for reception, not sure which one. For transmitting you are testing status of first 32 MBs (MBs 0-31). This does not make much sense. Test just remaining MBs from those 16 MBs enabled, or better only those used for transmission.
You can also try to extend timeout value in blocking function.
BR, Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
