Hi all,
I am new to Processor Expert . My English is not that good ,forgive me if somehow cause a misunderstanding .Here below is what U may help me :
best regards !
hefei
BATTERY MANAGEMENT SYSTEM R&D.WXEV
Solved! Go to Solution.
Please find attached a simple demo project for HCS12 C32 that you may find useful. It does a simple "bridge" between SCI and CAN (MSCAN) with using FreescaleCAN. It receives characers on SCI and sends them via CAN and vice versa. It also shows reading ADC and settings PWM.
You can also find some basic code snippets on "Typical usage" page of the help for the Freescale_CAN component.
best regards
Petr Hradsky
Processor Expert Support Team
Hello all, i´m new with the P.E too, and i´m in trouble trying to configure the MSCAN on Cold Fire V1.
I tryed to find the attached simple demo project for HCS12 C32 but i didn´t get anything. I´m using CW 6.3. To be honest, i´m starting with the CAN module, i don´t have a simple idea how to procedure. Could anyone help me?
Petr Hradsky or anyone else, could you direct me , where can i find that useful bridge document about SCI and CAN?
Thank you!
first,U need a license.
second,you can find everything in your PC somewhere like :\Freescale\CodeWarrior for Microcontrollers V6.3\ProcessorExpert\Projects\Test projects
This can BE a lot help :smileyhappy:
Hi Steven, i have already a license for the MCU Code Warrior 6.3, but that library doesn´t contain that micro controller that you are using, because of that i would like to see a demo project to configure mine. I found the Typical Usage that you all were refering to. Thanks! I apreciate very much!
P.S. do you have a document, or PDF that you can show me, a little example of the can process? I´m really lost about it =\
After all, i´m going to reconfigure my MCU and see if a can handle that.
Best regards;
I will be back later and answer your question . I am quite busy right at the moment~
Hi,
ad 1) Do you mean board documentation ? The schematics is available at
other documents are also available on the product page:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=DEMO9S12XEP100&fsrch=1
ad 2) What PEx component do you use for the configuration? There are two available - Init_MSCAN that provides just initialization code and Freescale_CAN component that also provides a runtime methods for CAN communication and it's commertial (can be bought from Freescale).
ad 4) If you set Init.code to enable, you don't need to call the initalization from the main, it's handled in PE_low_level_init() function.
For debugging purposes I recommend to enable loop-back mode and also enable error interrupt/event. If you send anything in loop mode, you should receive it immediatelly.
best regards
Petr Hradsky
Processor Expert Support Team
Hi, thank you for the board documentation . YEAH , I do use Freescale_CAN component for my configuration .Thank you again for telling the initalization is handled in PE_low_level_init() function ,otherwise the compiler may keep warn me for ignoring it .
I had been woking on the loop-back mode configuration these days . Somehow it meets problems that I can not tell exactly .
DO U have a DEMO PE project for CAN communication ? Or where can I find a tutorial documentation for PE MSCAN configuration ?
Thank you so much !
best regards !
He Fei
BMS R&D.WXEV
Please find attached a simple demo project for HCS12 C32 that you may find useful. It does a simple "bridge" between SCI and CAN (MSCAN) with using FreescaleCAN. It receives characers on SCI and sends them via CAN and vice versa. It also shows reading ADC and settings PWM.
You can also find some basic code snippets on "Typical usage" page of the help for the Freescale_CAN component.
best regards
Petr Hradsky
Processor Expert Support Team
It is me again .I have got two questions here :
first,do I need to confige the PINs through the CAN configuration?Most of the time I cannot see them(or it) .
second ,during the CAN1_SendFrame()function ,I got a "transmit buffer full error" all the time .what can I do ?
/*
if (!(CAN0TFLG & bufmask)) { /* Is the transmit buffer full? */
return ERR_TXFULL; /* If yes then error */
}
*/
Attachment: picture for the first question ,the other for the second and my code is in event.c document .thank you !
Hi,
ad 1) Yes, the pins need to be selected. From your screensot, there seems to be a problem that you have two Freescale_CAN components in the project - you should remove one of them.
ad 2) This error means that your message wasn't received. In CAN communication, the message is not treated as sent until the receiving device acknowledges the reception. The problem might be that you don't have target device properly connected, it doesn't work or the timing configurations of the transmitter and receiver do not match.
best regards
Petr Hradsky
Processor Expert Support Team
Thank you so much ! My target device was not connected properly
HAHA ,the "Typical Usage" pageis just amazing !!!
I happened TO go to the "Bean FreescaleCAN page"early today ,some how just miss it ! THE Typical Usage page !! Thanks a lot ! Now I am going to read all of them !
Thank you again for all your kindhearted help !!!
I will be back soon ~~~