Hi dear nordic employee:
I use blew:
chip:nrf52832 CIAA-B00
SDK: 12.3.0
what‘s I want is same as this , when the interrupt happen,I want to know the toggle is HIGH_TO_LOW or LOW_TO_HIGH
And I cannot use hi_accuracy,because the nrf52832 CIAA-B00 has the current bug when use the hi_accuracy mode(BUG 97)
And I find code in the UART Low Power example,But I donot have a SDK9.0(the oldest version is 12.0),So I donot know how it works
static void gpiote_uart_event_handler(uint32_t event_pins_low_to_high,
uint32_t event_pins_high_to_low)
{
if ((event_pins_high_to_low & event_pins_low_to_high & m_pin_cts_mask) != 0)
{
// We have an indication from GPIOTE that the CTS pin has toggled high->low and low->high.
// If this occurs, we must read the active pins in the GPIOTE module ourself.
uint32_t active_pins;
uint32_t err_code;
err_code = app_gpiote_pins_state_get(m_gpiote_uid, &active_pins);
if (err_code != NRF_SUCCESS)
{
// Pin reading was not possible, even though an event from GPIOTE was received that the
// CTS pin toggled. If pin double toggled but status cannot be fetched we silently
// return and keep the current UART status as-is.
return;
}
event_pins_low_to_high &= active_pins;
event_pins_high_to_low &= ~active_pins;
}
if ((event_pins_high_to_low & m_pin_cts_mask) != 0)
{
on_uart_event(ON_CTS_LOW);
}
else if ((event_pins_low_to_high & m_pin_cts_mask) != 0)
{
on_uart_event(ON_CTS_HIGH);
}
else
{
// Do nothing, as the CTS pin didn't toggle.
}
}
Any suggestion will be appreciate!
Thanks and regards
Victor