This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1312 - Trying to use Ymodem protocol and TI Mailbox

Hi,

What is the maximum size for .bufsize in TI Mailbox? The maximum buffer length I need to send through the mailbox is 1033. But seems like the mailbox init function does not like the size, it crashes when I try to Mailbox_Construct() with those parameters. I think it's too big(?) because when I change the MAILBOX_SIZE to 16 instead of a large number, it works perfectly fine.

I am trying to implement the Ymodem transfer protocol using TI UART and Mailbox - which is why my buffer is so large. It needs to transport 1024 byte data packets. 

Here are my mailbox size and buffer used:

#define MAILBOX_SIZE = 2000

uint8_t message[MAILBOX_SIZE];

Here are my mailbox parameters in my MailboxInit():

Mailbox_Params_init(&mboxParams);

Error_init(&eb);

uint32_t size = sizeof(Mailbox_MbxElem) + MAILBOX_SIZE;
Mailbox_construct(&mailboxStruct, size, MAILBOX_SIZE, &mboxParams, &eb); //1 message

mailboxHandle = Mailbox_handle(&mailboxStruct);
if (mailboxHandle == NULL)
{
return -1;
}

mboxParams.buf = message;
mboxParams.bufSize = size;

return 0;

Thank you.