Skip to main content
dkuma.1
Associate II
April 16, 2024
Question

Interfacing AT21CS01-STUM10-T 1-Wire EEPROM with STM32C011F6U6TR Read/Write Implementation

  • April 16, 2024
  • 11 replies
  • 4000 views

Hi Everyone,

I am currently working on a project that involves interfacing the "AT21CS01-STUM10-T" 1-wire EEPROM with the STM32C011F6U6TR microcontroller. I aim to implement read and write operations between these components but require guidance on the hardware setup and code flow.

Specifically, I seek assistance in understanding the following:

  1. Hardware Connection: I need guidance on how to physically connect the 1-wire EEPROM to the STM32C011F6U6TR microcontroller. What are the necessary connections and considerations for ensuring proper communication?

  2. Code Flow: I am looking for insights into the code structure and flow required to communicate with the 1-wire EEPROM using the STM32C011F6U6TR microcontroller. How should I initialize GPIO pins and implement functions for read and write operations?

  3. Read Operation: Could someone provide guidance on how to perform read operations from the 1-wire EEPROM? What are the necessary steps and considerations for retrieving data reliably?

  4. Write Operation: Similarly, I would appreciate advice on how to perform write operations to the 1-wire EEPROM. What steps are involved, and how can I ensure the integrity of written data?

  5. Error Handling: What are some best practices for error handling during communication with the 1-wire EEPROM? How can I detect and mitigate potential issues such as communication failures or data corruption?

Any insights, code snippets, or references to relevant documentation would be greatly appreciated. Thank you in advance for your assistance.

Best regards

Dharmendra

This topic has been closed for replies.

11 replies

Andrew Neil
Super User
April 16, 2024

@dkuma.1 wrote:

"AT21CS01-STUM10-T" 1-wire EEPROM 


So this: https://www.microchip.com/en-us/product/at21cs01

On that page, you will find the datasheet for the part - that should provide the details of the hardware connection and read & write operations.

There is also an Application Note describing how to interface the device to a microcontroller.

There is also a link to the manufacturer's support resources - for specific questions about their device.

 

Do you have some particular reason for using this proprietary interface rather than an industry standard (eg, I2C) that is directly supported by the STM32?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
dkuma.1
dkuma.1Author
Associate II
April 16, 2024

Thanks  @Andrew Neil  for your reply.

Yes, I've already reviewed both the datasheet and Application Note for the device. While the hardware connection details are clear, I've found the code implementation a bit challenging, especially in the context of ST MCU. The provided examples primarily reference PIC MCU, which has made adaptation to ST MCU a bit more complex for me,

Yes, there's a specific reason for opting for this proprietary interface over an industry standard like I2C. In our setup, the STM32 MCU and EEPROM are situated on different boards, communicating with each other via a magnetic connector. By utilizing a one-wire interface, we aim to minimize the size and complexity of the connector, which is crucial for our design constraints.

Andrew Neil
Super User
April 16, 2024

@dkuma.1 wrote:

the STM32 MCU and EEPROM are situated on different boards, communicating with each other via a magnetic connector.


Are you sure that this Microchip Single-Wire interface is suitable for that?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
L_Kopp
Associate II
January 3, 2025

Did you make it? I am also trying to connect a 1-Wire EEPROM from mircochip to your STM32 

Andrew Neil
Super User
January 3, 2025

@L_Kopp wrote:

I am also trying to connect a 1-Wire EEPROM from mircochip to your STM32 


So have you done all this: https://community.st.com/t5/stm32-mcus-embedded-software/interfacing-at21cs01-stum10-t-1-wire-eeprom-with-stm32c011f6u6tr/m-p/662556/highlight/true#M46968 ?

 

From that Microchip datasheet, their 1-wire interface looks to work on similar principles to the "Dallas" (now Analog Devices) 1-WireTM interface, so maybe you can "synthesise" that using a UART - as here:

https://community.st.com/t5/others-hardware-and-software/dallas-ibutton-and-uart/m-p/756084/highlight/true#M30327

Or perhaps use SPI ?

Again, perhaps Microchip already have something on that ... ?

https://www.microchip.com/en-us/support

https://forum.microchip.com/s/sub-forums?forumId=a553l000000J2pwAAC&forumName=Memory%20&subForumId=a553l000000J2qfAAC&subForumName=UNI%2FO%E2%84%A2%20Serial%20EEPROM

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Visitor II
May 3, 2025

Hi

I am currently also trying to program this EEPROM

 If this worked for you,can you please share with me your implementation

thank u

Andrew Neil
Super User
May 6, 2025

@Chico wrote:

I am currently also trying to program this EEPROM


So, again, have you tried all the things already suggested?

 


@Chico wrote:

 If this worked for you,can you please share with me your implementation


Given @dkuma.1 hasn't had any activity on this forum in over a year, and @L_Kopp in over 4 months, that seems unlikely...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.