Not applicable
Oct 08, 2015
04:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 08, 2015
04:03 AM
Hi,
I am working on SPI of 4100(XMC 4500 Master Mode) which is interfaced with SPI EEprom, the pins which I am using are P1.7 U0C0_DOUT(MTSR) , P1.1 U0C0_DX1A(MRST) ,P1.8 CS & 1.9 is CLK. Master(4100) unable to receive any data over MISO(P1.1)!!
So can we use P1.1 as MRST Pin for Master Mode(FULL Duplex)??
I am working on SPI of 4100(XMC 4500 Master Mode) which is interfaced with SPI EEprom, the pins which I am using are P1.7 U0C0_DOUT(MTSR) , P1.1 U0C0_DX1A(MRST) ,P1.8 CS & 1.9 is CLK. Master(4100) unable to receive any data over MISO(P1.1)!!
So can we use P1.1 as MRST Pin for Master Mode(FULL Duplex)??
5 Replies
Oct 08, 2015
08:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 08, 2015
08:11 PM
Hello,
For SPI protocol, the input function DX1 is meant for SPI slave SCLKIN.
Therefore, it cannot be used as the SPI master MISO.
The MISO has to be fulfilled by DX0.
For U0C0, the options are:
- DX0A: P1.5
- DX0B: P1.4
- DX0F: XTAL1 (if this pin is not used for XTAL)
To help you have an easier view of the possible peripheral pin functions, you can make use of the pin out tool (link below):
http://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-ar...
In the tool, you can select XMC4200 (same pin functions as XMC4100) and then SPI master.
You will see the following:
Regards,
Min Wei
For SPI protocol, the input function DX1 is meant for SPI slave SCLKIN.
Therefore, it cannot be used as the SPI master MISO.
The MISO has to be fulfilled by DX0.
For U0C0, the options are:
- DX0A: P1.5
- DX0B: P1.4
- DX0F: XTAL1 (if this pin is not used for XTAL)
To help you have an easier view of the possible peripheral pin functions, you can make use of the pin out tool (link below):
http://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-ar...
In the tool, you can select XMC4200 (same pin functions as XMC4100) and then SPI master.
You will see the following:
Regards,
Min Wei
Not applicable
Oct 08, 2015
10:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 08, 2015
10:34 PM
Thanks, Min Wei,
Now I have configured P1.4 as MISO but still I am facing the same problem, No data on MISO, first byte what I am sending is WRITE ENABLE COMMAND (0X06), while reading status register,I have sent 0x05 Command) there is no change at MISO line...??
EEPROM which I am using is ST M95320.
Regards,
Irfan
Now I have configured P1.4 as MISO but still I am facing the same problem, No data on MISO, first byte what I am sending is WRITE ENABLE COMMAND (0X06), while reading status register,I have sent 0x05 Command) there is no change at MISO line...??
EEPROM which I am using is ST M95320.
Regards,
Irfan
Oct 08, 2015
11:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 08, 2015
11:19 PM
Hello Irfan,
So there is no response from the slave, i.e. MISO is not toggling?
Then the problem is probably not specific to the input function.
Are you able to monitor the 3 SPI outputs on the oscilloscope and if they look correct?
For example, if the CS is asserting/deasserting as expected per frame.
Regards,
Min Wei
So there is no response from the slave, i.e. MISO is not toggling?
Then the problem is probably not specific to the input function.
Are you able to monitor the 3 SPI outputs on the oscilloscope and if they look correct?
For example, if the CS is asserting/deasserting as expected per frame.
Regards,
Min Wei
Not applicable
Oct 08, 2015
11:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 08, 2015
11:54 PM
Yeah, CS getting toggled for every Frame and MOSI is also showing the expected behaviour (Toggling with respect to data). I am not sure that master is talking to a slave as a master is not receiving any response from the slave.
Oct 09, 2015
01:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 09, 2015
01:27 AM
From the ST M95320 data sheet, the sequence for read status register as follows:
You mentioned that you are using the sequence:
1st word: Write enable command
2nd word: Read status register command
3rd word: I assume dummy data to shift out the EEPROM output
But is the write command necessary?
Sorry I am not familiar with this EEPROM but maybe you can try just sending the read command and dummy data, and check again if the MISO toggles during the data transfer of the dummy data.
Regards,
Min Wei
You mentioned that you are using the sequence:
1st word: Write enable command
2nd word: Read status register command
3rd word: I assume dummy data to shift out the EEPROM output
But is the write command necessary?
Sorry I am not familiar with this EEPROM but maybe you can try just sending the read command and dummy data, and check again if the MISO toggles during the data transfer of the dummy data.
Regards,
Min Wei