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

AURIX™ Development Studio Forum Discussions

EthanHunt
Level 1
Level 1
5 replies posted 5 sign-ins First like given

Hi,

I am trying to integrate external SPI Flash Memory to Aurix TC38A (Tricore) controller using IfxQspi driver (version : iLLD_1_0_1_4_0)

1)  I could not read the device ID when I am sending the read command (RDID command  --> 9Fh )

2) Also the chip select pin is not going low during transmission of the data

Can you please tell me if there is any driver  I have to use ? or What am I missing .

Please help me to resolve this issue 

0 Likes
1 Solution
Nambi
Moderator
Moderator
Moderator
First like given 25 likes received 50 solutions authored

Hi,

Based on our understanding, the first 0xFF which you are observing could be dummy/garbage data on the SO line while the master sends the RDID command (9Fh) on the SI line. The next three bytes on the SO line send the requested information.

You can refer to "Figure 27 Read Identification (RDID) command sequence" in "8.2.1 Read identification (RDID 9Fh)". You can see that data is available at the next cycle of the instruction.

The following 0xFF bytes could again be undefined data. See the highlighted sentence in the other attachment.

Continued shifting of output beyond the end of the defined ID address space will provide undefined data.

You can download the Low-Level Driver for SPI Flash from this link https://www.infineon.com/cms/en/design-support/software/device-driver-libraries/memories-for-embedde...

This is the link for a forum thread where a sample project to interface S25FL064L with PSoC 6 using the LLD is attached- https://community.infineon.com/t5/Nor-Flash/S25FL064L-64-Mb-8-MB-3-0-V-FL-L-SPI-Flash-Memor/m-p/2645...

Best Regards.

View solution in original post

0 Likes
10 Replies
Aiswarya
Moderator
Moderator
Moderator
10 solutions authored 25 replies posted 50 sign-ins

Hi,
Kindly refer to the ADS code example below and adapt at your end to check if you are able to interface memory with Aurix correctly.

Regards,
Aiswarya.

Hi Aiswarya,

Thank you for the quick reply. 

I have tried interfacing in the same way as ADS code example, still I don't see any Device ID information while I am sending the  RDID command

Best Regards,

Ethan Hunt

0 Likes
Nambi
Moderator
Moderator
Moderator
First like given 25 likes received 50 solutions authored

Hi,

i) "2) Also the chip select pin is not going low during transmission of the data"
a) Could you check if all the SPI Master lines send the data as expected now and share the waveform?
ii) Could you check and confirm if S25FL064L is powered, not in reset, not in the standby state, and not in QPI mode?

Best Regards.

0 Likes

Hi Nambi,

Current status : I am able to read the Device ID. (Issue : I have changed the data length from 32 to 8 bits)

How ever I am getting data as --> 0xFF 0x01 0x60 0x17 0xFF 0xFF 0xFF 0xFF.

In the data sheet device Id has to start from Byte 0 but I am receiving it from Byte 1. 

I am reading the data of the received data (variable) using debugger

Attached Images:

SPI_PNG : Data sheet Device ID

Device_png : Received data of device Id

0 Likes
Nambi
Moderator
Moderator
Moderator
First like given 25 likes received 50 solutions authored

Hi Ethan,

Could you also confirm the data by observing the waveform on the bus?

Best Regards.

Hi Nambi,

Unfortunately, I cannot collect the waveform as the controller I am using is a sealed one. 

Earlier I had another controller which has test pins but that one got short circuited and not working. 

So, I am using this sealed one and I can read the Device Id (of course after the changes in SPI configuration).  But the device Id byte address is getting started form Byte address 1 instead of Byte 0.

I am reading the data using CAN protocol and also, I have checked the data using debugger (Lauterbach debugger). Attached image of the CAN protocol SPI data 

Best regards,

Ethan Hunt. 

SPI_Instruction_Data_With_CMD.png

0 Likes
Nambi
Moderator
Moderator
Moderator
First like given 25 likes received 50 solutions authored

Hi Ethan,

A waveform would be more conclusive. You can still try to check this option.

A general observation. All RX messages start with 0xFF. You can further on this aspect.

Best Regards,
Nambi.

EthanHunt
Level 1
Level 1
5 replies posted 5 sign-ins First like given

Hi Nambi,

I will try to obtain the waveform.

In between I was going through S25FL064L data sheet and found out that in chapter 8 page no 59

8.1.5 Read Flash Array
Data may be read from the memory starting at any byte boundary. Data bytes are sequentially read from incrementally higher byte addresses until the host ends the data transfer by driving CS# input High. If the byte address reaches the maximum address of the memory array, the read will continue at address zero of the array.

 

Is this the above reason I am receiving data from different byte address? Can you please confirm.

 

Best Regards

 Ethan

 

 

 

0 Likes
Nambi
Moderator
Moderator
Moderator
First like given 25 likes received 50 solutions authored

Hi,

Based on our understanding, the first 0xFF which you are observing could be dummy/garbage data on the SO line while the master sends the RDID command (9Fh) on the SI line. The next three bytes on the SO line send the requested information.

You can refer to "Figure 27 Read Identification (RDID) command sequence" in "8.2.1 Read identification (RDID 9Fh)". You can see that data is available at the next cycle of the instruction.

The following 0xFF bytes could again be undefined data. See the highlighted sentence in the other attachment.

Continued shifting of output beyond the end of the defined ID address space will provide undefined data.

You can download the Low-Level Driver for SPI Flash from this link https://www.infineon.com/cms/en/design-support/software/device-driver-libraries/memories-for-embedde...

This is the link for a forum thread where a sample project to interface S25FL064L with PSoC 6 using the LLD is attached- https://community.infineon.com/t5/Nor-Flash/S25FL064L-64-Mb-8-MB-3-0-V-FL-L-SPI-Flash-Memor/m-p/2645...

Best Regards.

0 Likes

Hi Nambi,

Yes, you are correct, the 0xFF byte is garbage, I have seen the timing diagram of RDID command. Data is obtained after the RDID command is sent until then the MISO line (Master input slave output pin is configured in pull up state) is HIGH.

Now I have configured the MISO pin in pulldown state, and I am receiving 0x00 (in the beginning) instead of 0xFF.

Thank you very much for your timely support and the link for S25FL064L driver.

 

0 Likes