HCS12 MSCAN module

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HCS12 MSCAN module

Jump to solution
3,760 Views
prog_ram
Contributor III
Hi,
I want to use the MSCAN module in the s12DP512 MCU to communicate with an automotive CAN Network.
I have good idea about the HCS12 MSCAN module, and I read the application notes (and did some simple CAN communicating with two nodes).
Now, my question is.
is there anyway to have the CAN module automatically Sync. with some other CAN board without the need to know what are the CAN network parameters and configurations by which this CAN board works?
 
in other words, there is an automatica Sync. in the SCI module to find the correct baud rate (by up/down the baud rate till the sync bit received), can we do the same in the CAN network.
 
another question please,
is there any known CAN configuration in the market so I can setup the MSCAN module to work by this configuration?
 
 
thank you and I appriciate the help..
 
bye.
 
Prog_ram
Labels (1)
0 Kudos
1 Solution
716 Views
nandu
Contributor III

Hi wilero17,

 

Refer to the following application notes if you havent referred them yet.. It might help you...

 

1. AN2283

2. AN1798

View solution in original post

0 Kudos
8 Replies
716 Views
wilero17
Contributor I
Hi I'm new in this topic. I'm working with two MCU's HCS12, and I want to communicate them via mscan, I was sawing some articles like AN3034 but I would like to know some other examples. may you can help me with mscan code. many thanks
0 Kudos
717 Views
nandu
Contributor III

Hi wilero17,

 

Refer to the following application notes if you havent referred them yet.. It might help you...

 

1. AN2283

2. AN1798

0 Kudos
716 Views
wilero17
Contributor I

Hi again,

 

 

As I said before, I'm working with the AN3034 example, and actually I have the MC9S12DG128B, but the pins 70,71,74 and 75 are busy and only the 72 and 73 pins are free. when I burned the s19 in the MCU, this was hot. I thing may be some pins (70,71,74 and 75) are the warming cause.

 

I want to know, how the pins should be configured in order to work with the 72 and 73 pins.

 

also, I was working with the Processor Expert and I have configurated the 72 y 73 pins, but I dont see any change in the code.

 

Many thanks. 

 

0 Kudos
716 Views
kef
Specialist I

MODRR register is used to change MSCAN pin routing. Please check the PIM block guide.

 

Does you chip gets hot also while in reset state? Try putting jumper to BDM connector between pins 2(gnd) and 4(/RESET). If it still gets hot, then make sure you didn't connect by mistake voltage regulator output to 5V. VDD1, VDD2 and VDDPLL should be NOT connected to 5V, they should connect to bypass capacitors only.

0 Kudos
716 Views
ProcessorExpert
Senior Contributor III
Hello,
 
regarding to the pin routing (muxing, etc) in Processor Expert. PE generates code for properly pin routing automatically and the code is located in the Cpu.c file. The code of this module is for example accessible from CPU beans pop-up menu using "View Source" menu command.
 
I have checked that generated code for MC9S12DG128B in CW 5.0 with latest PE servicepack V3.01 is correct and it accords to manual (S12DP256PIMV2.pdf).
 
best regards
Vojtech Filip
Processor Expert Support Team
0 Kudos
716 Views
wilero17
Contributor I
Many thanks. Good files.
0 Kudos
716 Views
Lundin
Senior Contributor IV
There is nothing automatic, but it is no big deal to tie one of the CAN lines to a timer input pin and measure it.

What do you mean with "known configuration"? If you mean the most common setting, I think that would be 11-bit identifier, 125kbps with the sample point as close to 85% as possible, sync jump width at 2tq.

I'd recommend to use the baudrates suggested in the CANopen standard DS301 whether you are using CANopen or not:

http://www.can-cia.org/canopen/protocol/bittiming.html
0 Kudos
716 Views
prog_ram
Contributor III
thank you..
this answered my question.
 
regards,
0 Kudos