On TWR-MPC8309, I’ve put together an MQX app that provides a socket server on each of the two Enet ports, receiving (and transmitting) CAN, converting to a text stream on the sockets.
Program works okay as “Ext-RAM debug” via USB tap. Also works okay as “U-boot Debug” if I download via USB-tap. However, if I take “Uboot_d.bin” loaded from USB memory stick via Uboot, the CAN portion doesn’t work. The Enet side works correctly, as well as serial comms on RS232 port, just the CAN is broken. Appears to be putting out signal on CAN, but is clearly broken at the interface level.
I was using the MQX 3.8 EAR3 that comes on DVD with the TWR-MPC8309 board. Decided to try the EAR4 version from Compass Extranet site. Both EAR3/EAR4 libraries compile fine by themselves, and link with my project as expected. However the MQX3.8 EAR4 version has a link error when I build my project (there are four similar errors listed):
Link Error: undefined ‘_MPC83xx_FCAN_int_init’
Referenced from ‘FLEXCAN_Error_int_enable’ in twrmpc8309_d.a
The mpc83xx_fcan.h source in MQX 3.8 EAR4 contains:
#define _flexcan_int_init _MPC83xx_FCAN_int_init
While the MQX3.8 EAR3 contains:
#define _flexcan_int_init _bsp_flexcan_int_init
And the func itself appears to be kind of a stub:
/*FUNCTION****************************************************************
*
* Function Name : _bsp_flexcan_int_init
* Returned Value : FLEXCAN_OK
* Comments :
* This function does nothing for PPC.
*
*END*********************************************************************/
uint_32 _bsp_flexcan_int_init
(
/* [IN] FlexCAN interrupt vector index */
uint_32 vector_index,
/* [IN] FlexCAN interrupt priority level */
uint_32 level,
/* [IN} Unmask the interrupt now? */
boolean unmask
)
{
return FLEXCAN_OK;
}
Fixing MQX 3.8 EAR4 by using the same ‘_bsp_flexcan_int_init’ stub gets rid of the link error in my project, but upon inspecting other MQX versions (i.e., 3.7) for other platforms (i.e., M5329) it appears that more should be going on in that function than just a return. Makes me think there’s some missing source code in MQX EAR4.
So I have two problems: CAN not working correctly when attempting to load app from within U_boot, and then there's the link error on MQX3.8 EAR4.
已解决! 转到解答。
Unfortunately I don't have experience with Freescale MQX 3.8 830x EAR3 for TWR-MPC8309, but I saw the release notes (attached) where it says the FlexCAN I/O driver is not fully tested. on page 6 (section 5.1 Unfinished Drivers):
the following drivers have either not yet been completed or fully validated:
- FlexCAN
The code for these drivers is included in the release; however they are not fully functional.
On page 2 (section 1 Read Me First)
This is an Early Access Release. As such, the contents have not undergone the same level of testing as the final release. Some features, specifically device drivers, are missing from this release. If you experience problems, contact Embedded Access at support@embedded-access.com for updates.
Have you tried the suggested contact ?
Unfortunately I don't have experience with Freescale MQX 3.8 830x EAR3 for TWR-MPC8309, but I saw the release notes (attached) where it says the FlexCAN I/O driver is not fully tested. on page 6 (section 5.1 Unfinished Drivers):
the following drivers have either not yet been completed or fully validated:
- FlexCAN
The code for these drivers is included in the release; however they are not fully functional.
On page 2 (section 1 Read Me First)
This is an Early Access Release. As such, the contents have not undergone the same level of testing as the final release. Some features, specifically device drivers, are missing from this release. If you experience problems, contact Embedded Access at support@embedded-access.com for updates.
Have you tried the suggested contact ?