2025-06-16 10:25 AM
Hi all.
I want to do read/write on eeprom microwire 93c66 but there is no open source HAL library that I can find. how can I do it? I am new to stm32.
Thanks
2025-06-16 11:12 AM
Hi,
>how can I do it?
As with every other cpu ...
- read ds of 93c66
- decide, how you want to do it, SPI, bit bang, ...
- or use a chip with standard I2C interface and connect to the I2C (and the HAL lib)
2025-06-16 12:07 PM
Here you can find help with this part.
2025-06-16 10:23 PM
I don't really understand how to read the datasheet and apply it like a timing diagram, because I was previously in arduino which is mostly an open source library.
2025-06-17 3:45 AM - edited 2025-06-17 3:46 AM
@No_Name wrote:I don't really understand how to read the datasheet and apply it like a timing diagram,
That is a basic skill - nothing specific to STM32.
As @Pavel A. suggests, if you don't have the time or inclination to do it yourself, then you'll need to pay someone to do it for you.
@No_Name wrote:because I was previously in arduino which is mostly an open source library.
That's the downside of relying on 3rd-party libraries - you're stuck until someone else provides a library!
If you're relying on the availability of 3rd-party libraries, then you have to just confine yourself to parts for which libraries are available.
As you say, the Arduino libraries are open-source - so you could get the source, and port that to your STM32.
Or, perhaps, load STM32Duino onto your STM32:
https://docs.arduino.cc/libraries/stm32duino-examples/
@No_Name wrote:I am new to stm32.
Start here:
2025-06-21 3:20 AM
@Andrew Neil wrote:
@No_Name wrote:I don't really understand how to read the datasheet and apply it like a timing diagram,
That is a basic skill
Where can I learn to read the datasheet properly? Is there a source for that?
2025-06-21 5:50 AM
Enrol on an electronics course?
https://www.egr.msu.edu/classes/ece480/capstone/read_datasheet.pdf
https://www.digikey.com/en/maker/tutorials/2024/how-to-read-and-understand-technical-datasheets
and many more via: https://www.google.com/search?q=how+to+read+a+datasheet
(other search engines are available)
2025-06-21 7:55 AM
Microwire is a "cousin" to SPI, but it's rather different. Its main advantage is that -- while billed as a 4-wire protocol -- it's designed such that it can run over a 3-wire (shared MISO/MOSI) bus.
I'm not aware of any STM32 that supports Microwire, and I didn't see any tricks to make the SPI talk to this device. If your requirement is to use this particular device I expect you'll have to bit-bang it based on datasheet (Microchip document DS21795B) Tables 1-3/4 and Figures 2-7/8.
----
ST sells a few Microwire EEPROMs (https://www.st.com/en/memories/standard-microwire-eeprom/documentation.html), but I don't see any sample code.
----
"Five minutes with Google" turned up this, though I suspect you'll have to add the GPIO part (I suppose it's in asm/ic/ssi.h):
https://github.com/themadinventor/u-boot-stm32/blob/master/drivers/mtd/mw_eeprom.c
Microwire implementations can vary quite a bit, so you should check the code against the datasheet Tables.