Hello guys, as the title, can anybody help me on this? A demo project is better to show how to integrate the Freemaster serial communication SW package with a mpc5644A CAN Tx/Rx driver. I found few example codes of mpc56xx on internet. I tried Freemaster CAN connection, but failed. Just calling FMSTR_Init() in the initialization, and it needs not extra 5644A CAN initialization, is that right?
my freemaster cfg in freemaster_cfg.h, use POLL_DRIVEN
#define FMSTR_LONG_INTR 0 /* complete message processing in interrupt */
#define FMSTR_SHORT_INTR 0 /* SCI FIFO-queuing done in interrupt */
#define FMSTR_POLL_DRIVEN 1 /* no interrupt needed, polling only */
/*****************************************************************************
* Select communication interface (SCI/FlexCAN base address)
******************************************************************************/
#define FMSTR_SCI_BASE 0xFFE40000UL /* LINFlex0 base on MPC5604B/P */
//#define FMSTR_CAN_BASE 0xFFFC0000UL /* FlexCAN0 base on MPC5604B/P */
#define FMSTR_CAN_BASE 0xFFFC4000UL /* FlexCAN_B base on MPC5644A */
#define FMSTR_DISABLE 0 /* To disable all FreeMASTER functionalities */
#define FMSTR_USE_SCI 0 /* To select SCI communication interface */
#define FMSTR_USE_FLEXCAN 1 /* To select FlexCAN communication interface */
my main() as below
int main(void)
{
volatile int counter = 0;
FMSTR_Init();
xcptn_xmpl (); /* Configure and Enable Interrupts */
/* Loop forever */
for(;;) {
counter++;
TestData1++;
if (TestData1 >= 10000)
{
TestData1 = 0;
TestData2++;
}
FMSTR_Poll();
}
}
Thanks,
hdp
Do you find your answer? I am facing the same question as you had