2024-12-22 03:06 PM - last edited on 2024-12-23 01:58 AM by Andrew Neil
Hi there!
i start to work with Dallas Ibutton and for my project i use STM32G031K8 nucleo. Because i need to read only one ibutton i use the UART peripheral and no ic dedicate for 1Wire. My problem is when i try to use the rx callback function for know when i receive all data (and i start wit receive one bit at the time) never shoot, If i put a simple delay of 1ms everythingh wor very well i can see all my data on my logic analyzer .Question because the nucleo use the second uart2 for debug is possible that give me the problem ? and if yes how can i resolve ?
Thank you soo much
Sergio
2024-12-22 08:29 PM
> Question because the nucleo use the second uart2 for debug is possible that give me the problem ?
No, if you're not using USART2 in your code, it won't affect your program. Doesn't matter that it's hooked up to the ST-Link chip.
2024-12-23 12:19 AM - edited 2024-12-23 04:30 AM
Hello,
Not everyone here knows what "Dallas Ibutton" is. So, when you formulate a request please think about others that need the have a clear a picture of your issue/request.
2024-12-23 12:40 AM
Yep you have a reason
https://www.analog.com/media/en/technical-documentation/data-sheets/DS1992-DS1993.pdf
2024-12-23 01:51 AM - edited 2024-12-23 02:15 AM
More specifically, you're talking about hacking 1-WireTM comms on a UART:
But, to understand what's going wrong with your implementation, you're going to have to give a lot more detail!
@SGian.1 wrote:My problem is when i try to use the rx callback function for know when i receive all data (and i start with receive one bit at the time) never shoot
Before getting into 1-WireTM, have you got this working well on a "normal" serial connection to a terminal (or whatever)?
@SGian.1 wrote:If i put a simple delay of 1ms everything work very well i can see all my data on my logic analyzer
So look carefully at your LA traces with & without that delay.
Compare & Contrast.
Does the non-working case comply with the 1-WireTM specifications?
As well as a LA, you should also check with an oscilloscope - that the analogue behaviour is correct ...
2024-12-23 01:57 AM - edited 2024-12-23 02:24 AM
@SofLit wrote:Not everyone here knows what is "Dallas Ibutton".
Indeed.
And they haven't been Dallas for decades now! And correct spelling is iButton.
2024-12-23 02:23 AM
@SGian.1 wrote:If i put a simple delay of 1ms everything wor very well i can see all my data on my logic analyzer
The AD article does say:
A delay may need to be added between the UART bytes being transmitted to allow for the required recovery time (TREC)