Cashe setting and local parameter

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
pistons7
Level 4
Level 4
50 questions asked 10 likes given 100 sign-ins

I am using TC399.
And I have important problems when setting local parameters.
For example, if I want to change the baud rate of SPI communication, but the specified value is
not set.

static IfxQspi_SpiMaster_Channel MasterCh;

void main( void )
{
setParam( 123456 );
}

void setParam( float32 param )
{
IfxQspi_SpiMaster_ChannelConfig handle;

handle.base.baudrate = param;

IfxQspi_SpiMaster_initChannel( &MasterCh , &handle );
}

When I watch MasterCh's baudrate in the debugger, a completely irrelevant value is set.
Is there a problem with my cache settings?
TC337LP had no problems during similar control.
When I checked with Memory Map, MasterCh was LMU (CPU0 DLMU) "0x900419f4".

0 Likes
1 Solution
Meet_T
Moderator
Moderator
Moderator
100 solutions authored 25 likes received 50 solutions authored

Hi,

By analyzing the code, it doesn't seem like an issue related to cache settings but rather it is related to the value of global time quantum length (TQ).


The function IfxQspi_SpiMaster_initChannel() calculates the value of parameters Q, A, B, C based on the baudrate that we provide but makes no changes to value of TQ and it is set to the default value of 0. So for tq=0, the minimum value of baudrate is 390625. That's why you're getting some irrelevant value. So can you please try by changing the value of TQ by configuring it in the GLOBALCON register. For example to get 123456 baudrate, you can configure GLOBALCON.TQ > 3.

Kind Regards,
Meet.

View solution in original post

0 Likes
1 Reply
Meet_T
Moderator
Moderator
Moderator
100 solutions authored 25 likes received 50 solutions authored

Hi,

By analyzing the code, it doesn't seem like an issue related to cache settings but rather it is related to the value of global time quantum length (TQ).


The function IfxQspi_SpiMaster_initChannel() calculates the value of parameters Q, A, B, C based on the baudrate that we provide but makes no changes to value of TQ and it is set to the default value of 0. So for tq=0, the minimum value of baudrate is 390625. That's why you're getting some irrelevant value. So can you please try by changing the value of TQ by configuring it in the GLOBALCON register. For example to get 123456 baudrate, you can configure GLOBALCON.TQ > 3.

Kind Regards,
Meet.

0 Likes