Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(BLE): Update PAL_UART to recover from error #999

Merged
merged 38 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2d4b9ff
replaced legacy flash and lock operations
EricB-ADI Apr 18, 2024
fed08d8
added test action
EricB-ADI Apr 22, 2024
4b2dba0
workflow path
EricB-ADI Apr 22, 2024
c88b44e
path resolved?
EricB-ADI Apr 22, 2024
f4b12d3
path issue
EricB-ADI Apr 22, 2024
ea2888f
take out if for now
EricB-ADI Apr 22, 2024
e93a38f
debug
EricB-ADI Apr 22, 2024
a6bad0f
debug
EricB-ADI Apr 22, 2024
46bdea3
source direct
EricB-ADI Apr 22, 2024
f3b696a
debug
EricB-ADI Apr 22, 2024
0869809
debug
EricB-ADI Apr 22, 2024
32da64e
debug
EricB-ADI Apr 22, 2024
f54e3e1
debug
EricB-ADI Apr 22, 2024
f55fd80
debg
EricB-ADI Apr 22, 2024
5768052
debug
EricB-ADI Apr 22, 2024
68d0804
debug
EricB-ADI Apr 22, 2024
4547794
debug
EricB-ADI Apr 22, 2024
e77bdff
source'
EricB-ADI Apr 22, 2024
1f2fa08
debug
EricB-ADI Apr 22, 2024
6e5d91c
debug
EricB-ADI Apr 23, 2024
ddcdf85
dbg
EricB-ADI Apr 23, 2024
50fb84a
disable old test for now
EricB-ADI Apr 23, 2024
b745889
comment out
EricB-ADI Apr 23, 2024
14cf7cb
updated action path
EricB-ADI Apr 23, 2024
f9a4519
try to pull env variables
EricB-ADI Apr 23, 2024
d56da6c
env maybe???
EricB-ADI Apr 23, 2024
1e4d5ed
playing around with env variables
EricB-ADI Apr 24, 2024
c029472
run default
EricB-ADI Apr 24, 2024
632cc10
debug global
EricB-ADI Apr 24, 2024
615c541
debug
EricB-ADI Apr 24, 2024
8fadc3a
Debug
EricB-ADI Apr 24, 2024
1afab8f
wf update
EricB-ADI Apr 26, 2024
1cdad7c
Update BLE_Examples_Test.yml
EricB-ADI May 9, 2024
1d81012
clang-format bot reformatting.
EricB-ADI May 9, 2024
713a45c
removed extra newline from revb driver
EricB-ADI May 10, 2024
7c961fe
fixed deleted code
EricB-ADI May 10, 2024
f9e5cfb
restore complete
EricB-ADI May 10, 2024
e372fac
added update to 690
EricB-ADI May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 33 additions & 17 deletions Libraries/Cordio/platform/targets/maxim/max32655/sources/pal_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,51 @@ static struct {
* \return None.
*/
/*************************************************************************************************/
void UART_CommonHandler(mxc_uart_regs_t *uart)
{
const int32_t err = MXC_UART_AsyncHandler(uart);

if(err == E_INVALID)
{
// If the uart is the console, we can try to recover since it is not critical
if(MXC_UART_GET_IDX(uart) == CONSOLE_UART)
{
MXC_UART_ClearRXFIFO(uart);
}
else
{
PAL_SYS_ASSERT(err == E_NO_ERROR);
}
}

}
void UART0_IRQHandler(void)
{
int result0;

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result0 = MXC_UART_AsyncHandler(MXC_UART0);
(void)result0;
PAL_SYS_ASSERT(result0 == 0);
UART_CommonHandler(MXC_UART0);

}
void UART1_IRQHandler(void)
{
int result1;

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result1 = MXC_UART_AsyncHandler(MXC_UART1);
(void)result1;
PAL_SYS_ASSERT(result1 == 0);
UART_CommonHandler(MXC_UART1);

}
void UART2_IRQHandler(void)
{
int result2;
{

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result2 = MXC_UART_AsyncHandler(MXC_UART2);
(void)result2;
PAL_SYS_ASSERT(result2 == 0);
UART_CommonHandler(MXC_UART2);

}
void UART3_IRQHandler(void)
{
int result3;

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result3 = MXC_UART_AsyncHandler(MXC_UART3);
(void)result3;
PAL_SYS_ASSERT(result3 == 0);
UART_CommonHandler(MXC_UART3);

}

/*************************************************************************************************/
Expand Down Expand Up @@ -159,6 +173,8 @@ void RISCV_IRQHandler(void)
/*************************************************************************************************/
void palUartCallback(mxc_uart_req_t* req, int error)
{


int i;
for(i = 0; i < PAL_UARTS; i++) {
/* Find the corresponding rqeuest and call the callback */
Expand Down
46 changes: 30 additions & 16 deletions Libraries/Cordio/platform/targets/maxim/max32690/sources/pal_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,51 @@ static struct {
* \return None.
*/
/*************************************************************************************************/
void UART_CommonHandler(mxc_uart_regs_t *uart)
{
const int32_t err = MXC_UART_AsyncHandler(uart);

if(err == E_INVALID)
{
// If the uart is the console, we can try to recover since it is not critical
if(MXC_UART_GET_IDX(uart) == CONSOLE_UART)
{
MXC_UART_ClearRXFIFO(uart);
}
else
{
PAL_SYS_ASSERT(err == E_NO_ERROR);
}
}

}
void UART0_IRQHandler(void)
{
int result0;

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result0 = MXC_UART_AsyncHandler(MXC_UART0);
(void)result0;
PAL_SYS_ASSERT(result0 == 0);
UART_CommonHandler(MXC_UART0);

}
void UART1_IRQHandler(void)
{
int result1;

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result1 = MXC_UART_AsyncHandler(MXC_UART1);
(void)result1;
PAL_SYS_ASSERT(result1 == 0);
UART_CommonHandler(MXC_UART1);

}
void UART2_IRQHandler(void)
{
int result2;

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result2 = MXC_UART_AsyncHandler(MXC_UART2);
(void)result2;
PAL_SYS_ASSERT(result2 == 0);
UART_CommonHandler(MXC_UART2);

}
void UART3_IRQHandler(void)
{
int result3;

PalLedOn(PAL_LED_ID_CPU_ACTIVE);
result3 = MXC_UART_AsyncHandler(MXC_UART3);
(void)result3;
PAL_SYS_ASSERT(result3 == 0);
UART_CommonHandler(MXC_UART3);

}

/*************************************************************************************************/
Expand Down
Loading