MQX3.6 MCF5225x baud rate error?

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

MQX3.6 MCF5225x baud rate error?

Jump to solution
840 Views
ARQuattr
Contributor IV

I had a project using SPI in MQX 3.6 running properly, and then some time later after recompiling the same project the SPI baud rate doubled for no apparent reason.  I confirmed that I'm setting IO_IOCTL_SPI_SET_BAUD properly, but when I check the scope the baud is always double what I set.  Has anyone seen this, or have an idea what's happening?

Thanks

Angelo

Tags (4)
0 Kudos
1 Solution
632 Views
DavidS
NXP Employee
NXP Employee

Hi Angelo,

I think I found the changed file when the GainSpan patch is applied for the MCF52259.

Here is a picture of the winmerge results.

ScreenHunter_01 Mar. 20 13.07.gif

Regards,

David

View solution in original post

0 Kudos
7 Replies
632 Views
DavidS
NXP Employee
NXP Employee

Hi Angelo,

The SPI Baus rate should not change with recompile unless the code changed too.

Did you apply a patch to MQX that might have changed the default setting?

Regards,

David

632 Views
ARQuattr
Contributor IV

I assume I changed something, but I can't tell what.  I did apply the Gainspan Wifi patch but I thought it only added it's own drivers and modified the twr52259 projects.  I'm using the MCF52259EVB BSP so I didn't think it would affect anything.  Maybe I'll reinstall MQX without the patch and do a diff on the after-patch files.

0 Kudos
632 Views
DavidS
NXP Employee
NXP Employee

Hi Angelo,

Good idea to uninstall/re-install and compare.

I just did that and do not see the SPI Baud changing in the M52259EVB BSP or MQX/examples/SPI.

Regards,

David

0 Kudos
632 Views
ARQuattr
Contributor IV

I agree, it's baffling.  And I'm not using the default setting in the BSP, I have my own define parameter which I know hasn't changed, that I pass using IO_IOCTL_SPI_SET_BAUD.  I print the value just before it sets the value and it's correct.  There must be something going on with a low level driver or on the hardware itself, clocks, dividers, etc.

0 Kudos
633 Views
DavidS
NXP Employee
NXP Employee

Hi Angelo,

I think I found the changed file when the GainSpan patch is applied for the MCF52259.

Here is a picture of the winmerge results.

ScreenHunter_01 Mar. 20 13.07.gif

Regards,

David

0 Kudos
632 Views
ARQuattr
Contributor IV

Hmm, how about that!  Thank you for finding this.  I guess I can change it back and try, but I wonder why it was changed in the first place.  I confirmed the original baud rate was correct.  Should I notify someone about this, or is that something you would take care of on your end?  (I'm not even sure if this patch is written by Freescale or GainSpan.)  Or maybe this problem was already fixed for a later version.

Thanks again

0 Kudos
632 Views
DavidS
NXP Employee
NXP Employee

Hi Angelo,

You are welcome.

I'll handle ensuring newest MQX is OK.

Just having this issue on the Community will help those using MQX3.6.

Regards,

David

0 Kudos