Delay to wait until strapping pin works as normal-function pins?

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Wed Sep 16, 2020 5:58 pm

Well I2C does pretty well using a pull up!

I thought single wire was open drain & so needed a pull up? Been so long & I tend to fall asleep when it gets to detailed electronics ;)

Were you also advised to add load match resistor and capacitor? Not many do/would but fitting the pads is always a good idea unless your layout guy has already stopped talking to you.
I am guessing that as you are single wire & you are not trying to break the laws of physics so you will be cool.

PS is the other MCU local within you box or external? What distance & what baud rate?
& I also believe that IDF CAN should be fixed.

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Wed Sep 16, 2020 10:28 pm

PeterR wrote:
Wed Sep 16, 2020 5:58 pm
Well I2C does pretty well using a pull up!

I thought single wire was open drain & so needed a pull up? Been so long & I tend to fall asleep when it gets to detailed electronics ;)

Were you also advised to add load match resistor and capacitor? Not many do/would but fitting the pads is always a good idea unless your layout guy has already stopped talking to you.
I am guessing that as you are single wire & you are not trying to break the laws of physics so you will be cool.

PS is the other MCU local within you box or external? What distance & what baud rate?
Hello Peter,
Thank you for your support.

I wish I could use the I2C! but I need multi-master and is not well implemented with many MCUs including the ESP32
Maybe I shall also write: & I also believe that I2C multi-master should be fixed :-)

This is why, as fallback, I would use this single wire solution: www.pjon.org/SoftwareBitBang.php
The other MCU is local, inside the box at few cm. According to the single wire imlementation, the speed is about few kB/s.

Any feedback is welcomed...before talking to my layout guy :-)


Regards,
Michel

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Wed Sep 16, 2020 11:26 pm

Cool,
My I2C point was that pull ups are also good & so to question your advice (along with the detailed load/capacitor match i.e. if you did not get latter advice then maybe you only have basic advice?). Clearly u would need another wire for I2C, anyways....
Not seeing any reason why not a pull up.
There are better electronics engineers on forum than me so maybe someone will support/oppose. I'm not seeing why pull down is better that pull up in an intenal circuit. Lot of stuff pulls up (I2C, SPI CS etc).
I will check your link but I would suggest you challenge your advice, why pull down not up?
EDIT: Few cm, few kB/s (like <50K bits/S) - you could pretty much close your eyes n wave two wires close together & it would happen. I Dupont my early alphas @10-20Mhz 20-30cm without issue & I test hard. The RMT module might help you reduce CPU loading if that's a concern.
& I also believe that IDF CAN should be fixed.

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Thu Sep 17, 2020 6:18 am

PeterR wrote:
Wed Sep 16, 2020 11:26 pm
Cool,
My I2C point was that pull ups are also good & so to question your advice (along with the detailed load/capacitor match i.e. if you did not get latter advice then maybe you only have basic advice?). Clearly u would need another wire for I2C, anyways....
Not seeing any reason why not a pull up.
There are better electronics engineers on forum than me so maybe someone will support/oppose. I'm not seeing why pull down is better that pull up in an intenal circuit. Lot of stuff pulls up (I2C, SPI CS etc).
I will check your link but I would suggest you challenge your advice, why pull down not up?
EDIT: Few cm, few kB/s (like <50K bits/S) - you could pretty much close your eyes n wave two wires close together & it would happen. I Dupont my early alphas @10-20Mhz 20-30cm without issue & I test hard. The RMT module might help you reduce CPU loading if that's a concern.
Ok
I'll Ask about the Pullip.
Ok, any link/Doc about your solution : wave two wires close together ? And also about The RMT module?

Thanks

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Thu Sep 17, 2020 8:50 am

Ok, any link/Doc about your solution : wave two wires close together ?
lol, it works mostly. Remember to close your eyes though!
And also about The RMT module?
Some ESP32-IDF code here: https://github.com/DavidAntliff/esp32-o ... /owb_rmt.c
& I also believe that IDF CAN should be fixed.

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Thu Sep 17, 2020 11:38 am

PeterR wrote:
Thu Sep 17, 2020 8:50 am
Ok, any link/Doc about your solution : wave two wires close together ?
lol, it works mostly. Remember to close your eyes though!
And also about The RMT module?
Some ESP32-IDF code here: https://github.com/DavidAntliff/esp32-o ... /owb_rmt.c
Ok. Ok .I see Even with eyes closed :-)
Unfortunately, this does not match my need. Because 1)the other MCU is not an ESP32 so I have to port the code (and hence not use RMT) 2)I need a BUS topology where many MCUs share the bus access concurrently. This solution is point to (multi)point solution with a master/slave architecture.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Thu Sep 17, 2020 7:39 pm

Ok, sounds like RMT is no good. There is a lot to be said about using a common code base between MCUs and with GPIO & bit banging you are closer to that. RMT is too ESP specific to make cross platform.
I guess the original pull down was recommended because the library used low to pass bus ownership/control. That should be easy to modify.
& I also believe that IDF CAN should be fixed.

michcfr
Posts: 30
Joined: Mon Jan 29, 2018 5:55 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby michcfr » Thu Sep 17, 2020 11:10 pm

PeterR wrote:
Thu Sep 17, 2020 7:39 pm
Ok, sounds like RMT is no good. There is a lot to be said about using a common code base between MCUs and with GPIO & bit banging you are closer to that. RMT is too ESP specific to make cross platform.
I guess the original pull down was recommended because the library used low to pass bus ownership/control. That should be easy to modify.
Yes, RMT is smart but very specific to the ESP32.
Even if it is modified so that the bus was reversed and kept high when inactive, packets between other MCUs could pull the pin down at the moment of boot/reset...

So we return to the starting point...how to add a delay to keep the pin disconnected from the bus when rebooting. If electronic guys can helps...?

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: Delay to wait until strapping pin works as normal-function pins?

Postby PeterR » Fri Sep 18, 2020 3:39 pm

Hope I am not misunderstanding this...
ven if it is modified so that the bus was reversed and kept high when inactive, packets between other MCUs could pull the pin down at the moment of boot/reset...
Or equally they could pull low or high (by transmitting) in your original scheme. Each might be a problem (cannot remember which way you wanted it).

That was what drove my original questions to ESP_Sprite.
Thankfully the pins are only sampled on Watchdog reset & Brown/Power.
So you must ensure that the ESP pins do not get modified during the ESP power recovery.
You do that by holding all logic in reset whilst power is bad - the ESP now cannot brown/power reboot without everyone else doing the same (you said all MCUs on same board).
To do that you need a voltage supervisor on your board.

Your MCU now only has to wait 1mS before playing with the SWB.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 110 guests