Not applicable
Sep 01, 2016
06:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 01, 2016
06:29 AM
Dear Community,
I am using a display and it would be nice if you could help me out with a little issue of mine.
Whenever I send a receive request, there is no response from the display driver.
Writing to the display works perfectly fine.
Whenever I send a read request,(e.g.
static UINT8 cmd = 0x09;
SPI_MASTER_Transmit_CMD(&SPI_MASTER_DISP, &cmd, 1);//DISPL_CMD_READ_PWR
IO_SET_MODE_P4_6(INPUT); // tested with and without this option to set it "tri-state"
static UINT8 ReadData[4];
if(SPI_MASTER_Receive(&SPI_MASTER_DISP, ReadData, 4U))
{
while(SPI_MASTER_DISP.runtime->rx_busy){}
}
)
I only see on my oscilloscope the following:
(Blue: ChipSelect, Green: MISO/MOSI, Yellow: D/C, Red: SCLK)
I am using 3 line serial interface half-duplex and a xmc4800 with the following configurations (see pictures at the end of the mail).
Do you have any idea what the reason could be for not seeing any answer from the display?
Thank you very much in advance!
Best regards
Tim
I am using a display and it would be nice if you could help me out with a little issue of mine.
Whenever I send a receive request, there is no response from the display driver.
Writing to the display works perfectly fine.
Whenever I send a read request,(e.g.
static UINT8 cmd = 0x09;
SPI_MASTER_Transmit_CMD(&SPI_MASTER_DISP, &cmd, 1);//DISPL_CMD_READ_PWR
IO_SET_MODE_P4_6(INPUT); // tested with and without this option to set it "tri-state"
static UINT8 ReadData[4];
if(SPI_MASTER_Receive(&SPI_MASTER_DISP, ReadData, 4U))
{
while(SPI_MASTER_DISP.runtime->rx_busy){}
}
)
I only see on my oscilloscope the following:
(Blue: ChipSelect, Green: MISO/MOSI, Yellow: D/C, Red: SCLK)
I am using 3 line serial interface half-duplex and a xmc4800 with the following configurations (see pictures at the end of the mail).
Do you have any idea what the reason could be for not seeing any answer from the display?
Thank you very much in advance!
Best regards
Tim
- Tags:
- half duplex
- IFX
- spi
- tft
3 Replies
Not applicable
Sep 01, 2016
06:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 01, 2016
06:32 AM
next image scope (see: no answer)
Sep 02, 2016
05:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 02, 2016
05:09 AM
Hi Tim,
try to set the MOSI pin to Open Drain Mode and also add an external pull up resistor. I should look like something like this...
Resistor value....try something like 4.7 kOhm 🙂 (this resistor value is mentioned in a lot of posts as a rule of thumb value).
You also need to remove the change of the pin to Tristate. In pseudocode it should be like:
-> DAVE APP initialization (MOSI pin will be set to Open Drain)
-> SPI_TRANSMIT
-> SPI_RECEIVE
Best regards,
Deni
try to set the MOSI pin to Open Drain Mode and also add an external pull up resistor. I should look like something like this...
Resistor value....try something like 4.7 kOhm 🙂 (this resistor value is mentioned in a lot of posts as a rule of thumb value).
You also need to remove the change of the pin to Tristate. In pseudocode it should be like:
-> DAVE APP initialization (MOSI pin will be set to Open Drain)
-> SPI_TRANSMIT
-> SPI_RECEIVE
Best regards,
Deni
Not applicable
Sep 06, 2016
05:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 06, 2016
05:35 AM
Hello Deni,
thank you for you answer!
I did now put the Output to open drain and added a pullup as you recommended.
Unfortunately I still see no answer from my Display. Could it be errorous, that between transmit and receive my clock has a Little "gap" where it is constantly 0 ? (see scope_6.bmp in my second post)
my code:
SPI_MASTER_Transmit_CMD(&SPI_MASTER_DISP, &cmd, 1);//DISPL_CMD_READ_PWR
static UINT8 ReadData[4];
if(SPI_MASTER_Receive(&SPI_MASTER_DISP, ReadData, 4U))
{
while(SPI_MASTER_DISP.runtime->rx_busy){}
}
Thank you for you answers!
Best regards
Tim
thank you for you answer!
I did now put the Output to open drain and added a pullup as you recommended.
Unfortunately I still see no answer from my Display. Could it be errorous, that between transmit and receive my clock has a Little "gap" where it is constantly 0 ? (see scope_6.bmp in my second post)
my code:
SPI_MASTER_Transmit_CMD(&SPI_MASTER_DISP, &cmd, 1);//DISPL_CMD_READ_PWR
static UINT8 ReadData[4];
if(SPI_MASTER_Receive(&SPI_MASTER_DISP, ReadData, 4U))
{
while(SPI_MASTER_DISP.runtime->rx_busy){}
}
Thank you for you answers!
Best regards
Tim