S12XE-S12XS-S08SG - priority in microcontrroller

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

S12XE-S12XS-S08SG - priority in microcontrroller

2,050 Views
sibarr
Contributor I
hallo all

i am a student doing internship and i have a basic question. The question is regarding the microcontroller Freescale S12XEG128CAL, Freescale S12XS128CAL and Freescale HCS08SG32CTL.

my question is:
what happens when lets say the microcontroller wants to send a low priority message through CAN-Bus. The CAN-Bus is busy and the message has to wait.Meanwhile the microcontroller needs to send a second high priority message through the same CAN-Bus too. Does the high priority message have to wait till the low priority message is sent first or does the microcontroller priortise internally and sends the high priority message first.

I would be grateful for any reply and when possible, can you also state where this function is stated or described in the documentation for this micocontroller.thank you.

--
Alban Edit: Please always include FSL Part Number in Message Subject line.



Message Edited by Alban on 2007-09-07 10:47 AM
Labels (1)
0 Kudos
3 Replies

404 Views
Steve
NXP Employee
NXP Employee
According to MSCANV3 module chapter:
"If more than one buffer is scheduled for transmission when the CAN bus becomes available for arbitration, the MSCAN uses the local priority setting of the three buffers to determine the prioritization."
 
Similar explanations are scattered throughout the chapter including the case when a message is already being transmitted.
0 Kudos

404 Views
Lundin
Senior Contributor IV
Which means that MSCAN doesn't give a **bleep** about which CAN id you assign the message. This is a major design flaw in my opinion. Not only do you have to bother messing with a setting the CAN standard already solved with its bit arbitration and collection avoidance, you are also suddenly limited to 8-bit priorities, instead of 11/29 bit.

And when you set two messages to equal tx priority, MSCAN will pick the message you first put in the buffer, again ignoring the CAN id.
0 Kudos

404 Views
Alban
Senior Contributor II
Hello Lundin,

I would like to understand what you mean by design flaw. The msCAN module is certified being conform to the CAN specification by a specialized third party (http:www.cs-group.de), therefore the design and priorities do respect all the protocol rules. Any exception would be or is (depends on device) expressed in the mask set errata sheet. These are documents starting with MSExxx.

You only have 3 transmit buffers, if you wish to take the CAN id into consideration, you can change the transmit buffer priority when loading the register and reprioritize in the ISR depending on pending messages after a transmission.

Regards,
Alban.



0 Kudos