I'm developing a CAN interface for MCF52259.
My project is based on MCF52259
demoboard.
I use MQX 4.0 and I'm using that example will
attached.
(C:\Freescale\Freescale_MQX_4_0\mqx\examples\can\flexcan)
I
need to know which ports sets the MQX driver uses
(PUC0,PUC1) or
(PTH5,PTH4).
You would have a can interface circuit to suggest?
Hello Gustavo,
According with the gpio_init.c file located at the path C:\Freescale\Freescale_MQX_4_0\mqx\source\bsp\m52259demo
The pins used are PUC0,PUC1
/*FUNCTION*-------------------------------------------------------------------
*
* Function Name : _bsp_flexcan_io_init
* Returned Value : 0 for success, -1 for failure
* Comments :
* This function performs BSP-specific initialization related to FLEXCAN
*
*END*----------------------------------------------------------------------*/
_mqx_int _bsp_flexcan_io_init
(
uint_8 dev_num
)
{
VMCF5225_STRUCT_PTR reg_ptr = _PSP_GET_IPSBAR();
switch (dev_num) {
case 0:
reg_ptr->GPIO.PUCPAR = (reg_ptr->GPIO.PUCPAR & ~0x03) | 0x02;
reg_ptr->GPIO.PUCPAR = (reg_ptr->GPIO.PUCPAR & ~0x0C) | 0x08;
break;
default:
return -1;
}
return 0;
}
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------