Jan 23, 2019
12:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 23, 2019
12:23 PM
Hello!
I'm trying to read/write an EEPROM 93c46 that uses a Microwire interface, which is to my knowledge a subset of SPI.
I still have trouble with the correct settings, this might be the case as I'm fairly new to XMCs and DAVE and therefore might no use the correct settings in my SPI app.
One problem I have encountered is the fact that according to the datasheet of the 93c46 the chip select is active high instead of active low.
Another thing is the state of the MOSI line which is high on default, altough it should not be.
An additional problem is the fact that the 93c46 does not use a multiple of 8 bits for its addressing. It uses 1 start bit, a 2 bit op code and 6 address bits
I thought about just using 4 Digital IOs and creating the necessary signals myself but I also failed at creating an accurate clock signal with a stable frequency that I can turn on and off.
I hope you can give me some hints.
Thanks!
I'm trying to read/write an EEPROM 93c46 that uses a Microwire interface, which is to my knowledge a subset of SPI.
I still have trouble with the correct settings, this might be the case as I'm fairly new to XMCs and DAVE and therefore might no use the correct settings in my SPI app.
One problem I have encountered is the fact that according to the datasheet of the 93c46 the chip select is active high instead of active low.
Another thing is the state of the MOSI line which is high on default, altough it should not be.
An additional problem is the fact that the 93c46 does not use a multiple of 8 bits for its addressing. It uses 1 start bit, a 2 bit op code and 6 address bits
I thought about just using 4 Digital IOs and creating the necessary signals myself but I also failed at creating an accurate clock signal with a stable frequency that I can turn on and off.
I hope you can give me some hints.
Thanks!
7 Replies
Jan 26, 2019
06:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 26, 2019
06:15 AM
Does anyone have an idea?
Jan 29, 2019
05:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 29, 2019
05:17 AM
Hello "TestAccount"
first, which DAVE Version do you use? Which apps?
I am pretty sure you will find a sloution with the SPI Master app under "advanced settings".
To generate a stable freq you have to use the pwm app. This is very easy to use.
best regards
Andreas
first, which DAVE Version do you use? Which apps?
I am pretty sure you will find a sloution with the SPI Master app under "advanced settings".
To generate a stable freq you have to use the pwm app. This is very easy to use.
best regards
Andreas
Jan 29, 2019
02:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 29, 2019
02:28 PM
Hi Andreas,
thank you for your reply.
I'm using DAVE 4.3.2 with only the SPI_MASTER app, as I'm right now only trying to get the EEPROM working.
I have now also found the "selo_inversion" member within the "XMC_SPI_CH_CONFIG_t" struct in the "spi_master_conf.c" file, but I'm not sure how to change it when using the SPI app. I sadly also didn't find anything helpful in the "advanced settings" of the app.
I have also tried the suggested PWM app for creating a stable clock signal, which works perfectly! I will also give using the 4 digital IO lines to implement the interface another go.
thank you for your reply.
I'm using DAVE 4.3.2 with only the SPI_MASTER app, as I'm right now only trying to get the EEPROM working.
I have now also found the "selo_inversion" member within the "XMC_SPI_CH_CONFIG_t" struct in the "spi_master_conf.c" file, but I'm not sure how to change it when using the SPI app. I sadly also didn't find anything helpful in the "advanced settings" of the app.
I have also tried the suggested PWM app for creating a stable clock signal, which works perfectly! I will also give using the 4 digital IO lines to implement the interface another go.
Feb 03, 2019
12:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 03, 2019
12:46 PM
Does anyone have more information on this topic?
Feb 05, 2019
02:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 05, 2019
02:37 AM
Looks like a SPI interface to me, don't know why the call it 3-wire.
Try it with CPOL=0, CPHA=0, means: SPI mode 0. (I could be wrong on this ...)
Try read any valid address. Should return 0xFF (default values in EEPROM). You'll find some interfacing examples for other chips when you google for the chip name.
Try it with CPOL=0, CPHA=0, means: SPI mode 0. (I could be wrong on this ...)
Try read any valid address. Should return 0xFF (default values in EEPROM). You'll find some interfacing examples for other chips when you google for the chip name.
Feb 05, 2019
01:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 05, 2019
01:50 PM
Hi ErnieT, thanks for the comment!
I have tried SPI mode 0 (and 1, 2 & 3 for good measure), but that didn't yield any results (MISO stays low for the entire time).
According to the datasheet the slave select line is also active high compared to active low for "standard" SPI which i was able to implement, but that didn't help either.
I'll try replacing the EEPROM with another identical one, maybe that helps.
I have tried SPI mode 0 (and 1, 2 & 3 for good measure), but that didn't yield any results (MISO stays low for the entire time).
According to the datasheet the slave select line is also active high compared to active low for "standard" SPI which i was able to implement, but that didn't help either.
I'll try replacing the EEPROM with another identical one, maybe that helps.
Feb 06, 2019
12:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 06, 2019
12:35 AM
If you are going for SPI anyways, also have a look at FRAM solutions. They have much more write cycles and an extremely reduced erase/writing times, which means you can write byte-wise and expect the writing to have finished with a single SPI clock cycle. No more polling the write status!
Also, those chips usually come with a status register, which eases getting the interface working during implementation. There are more benefits, but they also come with higher price compared to EEPROMs.
EDIT: Interfaces of EEPROMs and FRAMs are usually very similar, so it should be easy to switch over.
Also, those chips usually come with a status register, which eases getting the interface working during implementation. There are more benefits, but they also come with higher price compared to EEPROMs.
EDIT: Interfaces of EEPROMs and FRAMs are usually very similar, so it should be easy to switch over.