I'm trying to use the MSCAN_KEA_DEVD package in S32DS for a KEAZ128. I've copied the driver files and the code into my project and I get compile errors in MSCAN_Module.c. NVIC_ICER, NVIC_IPR7, and NVIC_ISER can not be resolved. I've copied the section of code causing the problem below.
I believe these are supposed to be enabling interrupts, but I do not see these show up in any documentation. I think maybe these have been depreciated, but wanted to pose the question here of what would be the appropriate replacement for this code?
Thanks,
Tom Olenik
Solved! Go to Solution.
Hello Thomas,
S32DS uses CMSIS functions for NVIC control in contrast to CodeWarrior "proprietary" header file NVIC macros.
I'd recommend you to replace NVIC macros with its CMSIS counterparts:
Attached is the entire S32DS project for your convenience.
[Updated] Fixed MSCAN IRQ Handlers (reported by 张三)
Regards,
Stan
Hi,Stan:
I am using Eval board(FRDM-KEAZ128) to run this project and can't tranmit data.
I check Schematic and find it uses MC33903 as CAN transceivers.MC33903 need uses SPI command to configure going to normal mode.
Can you share me the project that runs at Eval board(FRDM-KEAZ128) ?
Hello. I have same trouble with my eval board: FRDM-KEAZ64. The source code doesn't work on this board and I don't have any signal on TX/RX (TP21/TP20). Where can be the problem?
PS: I don't understand where it's config the SBC NCZ33903?
Hi,I have find answer.please refer to the following link:
1. Like andreascarponi, I have a ERR_SYNCH return value from the Transmit_CAN_MB function.
2. Another trouble it's when I change J107 to PIN1 and PIN2. In that moment the MCU stopped work.
3.
How I can debug the board if it's necessary to connect 12V source on J16?
Hello Stan:
I am also using your project as a reference and facing Compile issues.
When click Test_case.c, I get compile errors in Test_case.c.It shows :Assignment to itself 'err_status = err_status'
What puzzles me is that,if I havn't click Test_case.c,it will complie successfully.
What should I do?
Hi,
This is an eclipse parser false positive error - please check the build console if the executable elf file has been created or not.
I can reproduce the issue. The eclipse IDE shows an error but build process has been successful. Please ignore that error.
Stan
Thank you for sharing the project implementing MSCAN on S32. After importing the project into S32 and skimming through all the included files and the MSCANKEA document, it is not entirely obvious if PTC6 and PTC7 (RX,TX) pins on the KEAZ128 are initialized to interface with the CAN transceiver. I do see the bitrate set to 500kbit/s.
I am confused as to why MSCAN is omitted from the SDK and why Processor Expert is available in S32 yet not supported for KEAZ.
Hi,
1)Can you share me the SDK for KEA-128?
2)Are you using CMSIS compliant library for KEA-128?
Hi,
KEA-128 SDK:
http://www.nxp.com/downloads/en/device-drivers/SDK-DRIVER-FRDM-KEA-S32DS.zip
Complete Quick Start package (SDK + board schematic + examples + documentation):
http://www.nxp.com/downloads/en/board-support-packages/FRDM-KEA-QSP.zip
Regards,
S.
Hello Thomas,
S32DS uses CMSIS functions for NVIC control in contrast to CodeWarrior "proprietary" header file NVIC macros.
I'd recommend you to replace NVIC macros with its CMSIS counterparts:
Attached is the entire S32DS project for your convenience.
[Updated] Fixed MSCAN IRQ Handlers (reported by 张三)
Regards,
Stan
Hello Stan,
I am also using your project as a reference and facing Reception issues.
There is no problem with sending message, But not able to receive any data instead i am getting receive error counter.
I am using Eval board to run this project,
Please help me to solve this issue
thanks and regards,
Manjunath
hi,
in CW,the IRQ is
void MSCAN_Rx_IRQHandler(void)
void MSCAN_Tx_IRQHandler(void)
but in S32DS is
void MSCAN_RX_IRQHandler(void)
void MSCAN_TX_IRQHandler(void)
you can find it in startup_SKEAZ1284.s
so please change it in MSCAN_Module.c and MSCAN_Module.h
Regards
Thanks for your comment.
I've fixed the example attached in my original answer.
Stan
Hi Manjunath,
Have you solved the reception problem in this CAN driver?
Stan,
Thanks. That was a big help.
Tom Olenik