qSPI (no MTRS2 output)

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

cross mob
Not applicable
Hello,
im want to send data over qSPI (4 data lines) at 10Mbaud with a word and Frame length of 16 Bit. I can see the CLK, MTSR0, MTSR1 and MTSR3 as outputs on the oscilloscope but i cant get any output on the MTSR2 no matter which pin i choose.

My program looks sth. like this:

uint16_t myData; //global variable

//cyclic called interrupt routine
void timerInterrupt(){
myData++;
EnableStartOfFrame (SPI001_Handle0 );
SPI001_WriteData(&SPI001_Handle0,&myData,SPI001_QUADMODE_HPC_OUTPUTMODE);
EnableEndOfFrame (SPI001_Handle0 );
}

Anyone an idea why i cant get any change on MTSR2? On the oscilloscope the output is always low.

Best Regards
Werner
0 Likes
5 Replies
Not applicable
Maybe the configuration of the GPIOs is not complet. Can you post your configuration of this pins?
Regards Jannis
0 Likes
Not applicable
This is my SPI configuration:
SPI001_ConfigType SPI001_Config0 =
{


.Mode = SPI001_QUAD,/* SPI Mode */
.HBMode = SPI001_LSB, /* Transmit LSB/MSB */
.ClkPol = SPI001_CLK_POL0, /* Clock Polarity */
.ClkPh = SPI001_CLK_PHASE0, /* Clock Phase */
.BaudRate = (uint32_t) 10000000,/* Baud Rate */
.LeadTrailDelay = SPI001_ONE_SCLK_PERIOD,/* Leading/TrailingDelay */
.NextFrameDelay = SPI001_ONE_SCLK_PERIOD,/* NextFrameDelay */
.WordLen = (uint8_t) 16,/* Wordlength */
.FrameLen = (uint8_t) 16,/* Framelength */
.CESelected = (uint8_t) CE_A /* Default Chip Select line selection */
};

SPI001_PinHandleType SPI001_PinHandle0 =
{

.Port_Num = {(uint8_t) 3, (uint8_t) 3, (uint8_t) 0, (uint8_t) 0},
.Pin_Num = {(uint8_t) 15, (uint8_t) 14,(uint8_t) 15, (uint8_t) 14},
/* Pin Port Base Address */
.PinPortRegs = {(SPI001_PORTS_TypeDef*)PORT3_BASE,
(SPI001_PORTS_TypeDef*)PORT3_BASE,
(SPI001_PORTS_TypeDef*)PORT0_BASE,
(SPI001_PORTS_TypeDef*)PORT0_BASE
},
.MRST_DSEL = (uint8_t) 1, /* DSEL Value */
.MTSR_IOCR = (uint8_t) 2 /* IOCR_PCR value */
};


const SPI001_HandleType SPI001_Handle0 =
{
.USICRegs = USIC1_CH1, /* Usic Channel offset value */
.FrmEndMode = SPI001_DISABLE_FEM,/* Frame End mode Selection*/
.Config = &SPI001_Config0,
.NoOfCS = (uint8_t) 1, /* No of ChipSelect line */
.ChipSelTable = {(uint8_t) 1, (uint8_t) 0, (uint8_t) 0, (uint8_t) 0,
(uint8_t) 0, (uint8_t) 0, (uint8_t) 0, (uint8_t) 0
},
.TxLimit = (uint8_t) 1,/* FIFO Tigger Level */
.RxLimit = (uint8_t) 1,/* FIFO Tigger Level */
.TxFifoSize = (uint8_t) 1,/* Tx FIFO Size */
.RxFifoSize = (uint8_t) 1,/* Rx FIFO Size */
.MSLSIntrEn = (bool) 0,/* MSLS Event enable */
.PinHandle = &SPI001_PinHandle0
};
0 Likes
Not applicable
Hi Werner,

I think moost probably is the pin did not set properly by the DAVE.
I try to reproduce on my side and I found out that my MTSR1 pin is not configured.
Therefore, for your workaround now, please manually configured the pin (either Pn_HWSEL or Pn_IOCR register).
We will logged this issue in our system to fix it in future.
Thank you.
0 Likes
Not applicable
Thanks for your help it was the HWSEL register.
If anybody else has this problem i just added:

PORT3->HWSEL |= 0x10000000;

after the DAVE_Init();

this will enable the hardware control path for Pin 3.14.
0 Likes
Not applicable
Hi Werner,

The issue has been logged in eTicketing with [eTicket ID: #95279910].

Best regards,
Sophia
0 Likes