FreeMASTER Bit Rate

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

FreeMASTER Bit Rate

1,269 Views
michelet1
Contributor II

Hello,

I'm trying to get Freemaster to communicate with the uC via CAN. Did I notice that you need to set the Bit Rate to FreeMASTER twice as much as the uC? Why is it not possible to set the same value used on the uC also on FreeMASTER?

Thanks

0 Kudos
5 Replies

1,254 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello,

I got used to never say "definitely correct", but the bit-rate settings is most probably correct on the FreeMASTER (computer) side. Can you tell what USB-to-CAN interface do you use? Anyway, you can always use an oscilloscope to see the CAN bus timing.

It is more likely that the MCU peripheral clock is set wrong and runs two times slower in your embedded application, so it only "seems" that you need to set the CAN bit rate twice higher. Can you verify this?

Thanks,
Michal

 

0 Kudos

1,250 Views
michelet1
Contributor II

Thanks for the answer,

I'm using vector VN1610 as an interface. I did some tests with the oscilloscope to check the CANH and CANL values and any bit rate value set FreeMASTER side I see CANH and CANL move. If imposed in FreeMASTER the same bit rate set on the uC side the CANH and CANL lines are flat. I can't understand the reason for this behavior

Thanks

0 Kudos

1,230 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello,

I'm sorry I do not have this device to test on my side. 

What is the bitrate you are trying to set? If you do not see any bus activity at all, it means the plug-in (or the Vector low-level library) has denied to set the bitrate and does not communicate. I would expect some error message in this case, but anyway.. 

Can you try to use some of the common speeds (10k, 100k, 500k)?

Thanks,
Michal

0 Kudos

1,226 Views
michelet1
Contributor II

I still can't make a CAN communication between FreeMASTER and the uC.

For this reason I performed the following procedure to test the CAN communication channel:

1) I set the baud rate at 500k on uC

2)I connected an oscilloscope and its probes to the CANH and CANL of the uC

3)FreeMASTER side I went to Options-->Plug-in module and selected CAN. Then I pressed the configure button and selected VECTOR-XL VER 0.14 and Bit rate 500k and then pressed the Test Connection button

I get error message timeout and on the oscilloscope I see CANL and CANH flat. The strange behavior is that if I change bit rates with any other value on FreeMASTER I always get timeout error but they move CANL and CANL on the oscilloscope. The timeout error is clear because my uC does not respond in time but what is not clear to me is because if I impose on FreeMASTER the Bit Rate equal to that of the uC I get CANH and CANL flat while if I change the bit rate side FreeMASTER CANH and CANL move.

I also tried to set the 250K bit rate on the uC but in this case setting 250k to FreeMASTER I get CANH and CANL flat while if imposed on FreeMASTER any other value other than 250k CANH and CANL move.

Thanks

0 Kudos

1,213 Views
MichalH
NXP Apps Support
NXP Apps Support

Strange indeed. Can you disconnect the target board when making the experiment? Just keep the bus properly terminated. You should be able to see at least the single start bit of width corresponding to the bit rate. Actually, there are going to be multiple attempts before the device will go to bus-off state..

Thanks,
Michal

 

0 Kudos