- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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".
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.