ThreadX PPPoS on MIMXRT1040-EVK

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ThreadX PPPoS on MIMXRT1040-EVK

ソリューションへジャンプ
241件の閲覧回数
MulattoKid
Contributor III

Hi,

I'm working on getting PPPoS working in ThreadX on an MIMXRT1040-EVK. However, I'm facing an obstacle related to the sending of PPP data over UART.

In ThreadX's nx_ppp_create function one of the parameters is ppp_byte_send, which should send 1 byte over the serial interface to the modem (Quectel EG800Q). To do this I use LPUART_WriteBlocking. However, the modem doesn't respond to using this mechanism:

 

 

void ppp_byte_send(UCHAR byte)
{
    LPUART_WriteBlocking(MODEM_REG_BASE, byte, 1);
}

 

 

I've determined the sequence of bytes being sent in the first message, and when sending these in a single call to LPUART_WriteBlocking it works:

 

 

void ppp_byte_send(UCHAR byte)
{
    uint8_t cmd[] = { 0x7E, 0xFF, 0x7D, 0x23, 0xC0, 0x21, 0x7D, 0x21, 0xC3, 0x7D, 0x20, 0x7D, 0x28, 0x7D, 0x21, 0x7D, 0x24, 0x7D, 0x25, 0xDC, 0xF1, 0xB7, 0x7E };
    LPUART_WriteBlocking(MODEM_REG_BASE, cmd, sizeof(cmd));
}

 

 

Lastly, sending the bytes listed above one by one in a loop also doesn't work.

I'm wondering if there's a different way I should go about implementing the ppp_byte_send function that ThreadX requires? FYI I know my setup works as I've gotten it working in both Zephyr and FreeRTOS, but we're evaluating which RTOS+TCP/IP stack to continue working with.

Thanks,
Daniel

タグ(4)
0 件の賞賛
1 解決策
223件の閲覧回数
MulattoKid
Contributor III

I'll blame this on it being Friday afternoon. LPUART_WriteBlocking takes in a pointer to the data, not a single byte, so it should be

 

void ppp_byte_send(UCHAR byte)
{
    LPUART_WriteBlocking(MODEM_REG_BASE, &byte, 1);
}

 

Now it works...!

元の投稿で解決策を見る

0 件の賞賛
1 返信
224件の閲覧回数
MulattoKid
Contributor III

I'll blame this on it being Friday afternoon. LPUART_WriteBlocking takes in a pointer to the data, not a single byte, so it should be

 

void ppp_byte_send(UCHAR byte)
{
    LPUART_WriteBlocking(MODEM_REG_BASE, &byte, 1);
}

 

Now it works...!

0 件の賞賛