-
• #2
Hi,
1) How do you configure the pin to act as reset?
It's already configured on the MDBT42Q
2) Is it active high or active low?
Active low. It always has been so it's Raytac's sheet that is wrong
-
• #3
How do you configure the pin to act as reset?
it is enabled by this line
and the change is permanently saved to configuration registers in UICR flash area (so removing that flag from build does not disable it)Reason being I want to add a brownout detection chip that resets the board if power dips.
just fyi the nrf5232 has brownout detection and does a reset
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_3_0#unique_521647991
there is also reset reason flag for brownout so you know it happened
https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_5_5#brown_out_reset -
• #4
Thanks both, especially for the reference manual. I'm used to register-level stuff in C, so all this high-level abstraction (and in JS no less) is confusing. Seems like it makes difficult stuff easy (the whole BLE stack) but easy stuff more difficult.
Thank you again, is there a way to tag a thread as 'answered'? -
• #5
but easy stuff more difficult.
Any example?
You can access hardware registers via poke/peek methods and also you can inline fragments of C code in case JS is not enough (speed, low level access). I don't know about anything that you couldn't do with Espruino. At worst it is easy to have custom build with own native C module with API visible from JS if inline C becomes too complicated (handle js variables directly inside C code).
-
• #6
Perhaps it's a lack of knowledge on my part, and maybe I should do some more reading before critiquing.
On the MDBT42Q page it says that pin D21 can be configured as 'NRST'. This conflicts with Raytac's datasheet where it says it can be configured as 'RESET'. I couldn't find anything in the API reference as to how to configure the pin.
So questions are:
1) How do you configure the pin to act as reset?
2) Is it active high or active low?
Reason being I want to add a brownout detection chip that resets the board if power dips.
Thanks in advance,
Rob