Skip to content

MIN protocol not working properly on TI MCUs but works on STM  #23

@ArielSmarTap

Description

@ArielSmarTap

Hello,
Have someone succeeded in running the protocol smoothly on TI MCUs?
it's working for me only on STM32F303VE
but it's not working on TI RM41L232 and TI CC3200MOD

1. ON STM ITS WORKS like this:
void HAL_UART_RxCpltCallback(UART_HandleTypeDef huart)
{
if (huart->Instance == UART4)//STM2DebugPort
{
/
Receive one byte in interrupt mode */
HAL_UART_Receive_IT(&huart4, &STM2DebugRxByte, sizeof(uint8_t));
min_poll(&STM2DebugMin_ctx, (uint8_t *)&STM2DebugRxByte, sizeof(uint8_t));
}
}

2. in CC3200MOD its can work slowly, but only if I pull the whole data from the UART interrupt handler Rx buffer at one shot. When I get an 0x55 byte (EOF) I'm pulling the buffer (SOF to EOF) at one shot from a different thread (Task) - SEE BELOW CODE

void Uart0IntHandler(void)
{
/* Receive interrupt /
if (MAP_UARTIntStatus(UARTA0_BASE, false));
{
MAP_UARTIntClear(UARTA0_BASE, UART_INT_RX);
/
Clear Interrupt /
while (MAP_UARTCharsAvail(UARTA0_BASE))
{
/
get the byte from the usart and push to rx buffer */
lRcvByte = (uint8_t)MAP_UARTCharGetNonBlocking(UARTA0_BASE);
if (lRcvByte != -1)
{
STMTxWifiRxBuff[idx] = lRcvByte;
tmp_byte = lRcvByte;
Report("%x ",tmp_byte);
/check if we have reached to EOF then poll on other thread/
if (tmp_byte == 85)
dataReady = true;
else
idx++;
}
}
}
}

the polling thread is:
void Uart0Poller(void)
{
if (dataReady)
{
dataReady = false;
min_poll(&STM2WiFiMin_ctx, (uint8_t*)&STMTxWifiRxBuff[0], ++idx);
// Report("Data polled -------> ");
idx = 0;
}
}

3. ON RM41L232 (Safety MCU - with no OS) it doesn't work and I'm losing Rx Frames, I tried it in both 2 ways like the above.
(it just that I cannot multithread like with the CC3200)

Please help I'm stuck on it a long time now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions