Our nRF52840 is connected via UARTE @ UART_1 to a modem which does not have a WAKE pin - the only method of waking it from sleep is to send a UART break. Is there any way to accomplish this on the nRF52840?
Our nRF52840 is connected via UARTE @ UART_1 to a modem which does not have a WAKE pin - the only method of waking it from sleep is to send a UART break. Is there any way to accomplish this on the nRF52840?
Hello,
I am not sure exactly what sort of device that is, but it looks like from here, that a break is the line being held low.
You can try to send a UART string containing 0x00's, and see if that triggers the modem to wake up.
If not, a UART break condition is just the line held low, so you can try to disable the UART, set the pin as an output, put it in logic low (set it to 0. You can use nrf_gpio_pin_clear(pin_number)).
But first, try to send a string containing some 0x00's.
Best regards,
Edvin
Best regards,
Edvin
Yeah the plan B is to reconfigure the baudrate to something very low and send 0x00. It feels pretty hacky tho :P
I don't know how your device interprets it, but according to the page that I linked, it may be sufficient to just send a 0x00. If not you have to do something else. It may be just as easy to disable the UART, set it to low, wait for a while (a bit more than one byte with the baudrate that you use, and turn the UART back on. I don't have the modem that you speak of, so I can't test it, but you can try to analyze the GPIO with a logic analyzer to see that it behaves like you want to.
So it's not the case that a break is sent if you for example suspend the UART and then resume it?f
Dead simple: Program the lowest baud rate that the UART(E) peripherial supports, and then send a 0x00 byte.
If you cannot go low enough, re-program the IO pin to be normal GPIO output and pull it down manually - you will need a way to keep track of time, too.