Unable to receive more data from UART High Level App and to calculate size of data in ISU ports

Nishith V Poojary 21 Reputation points
2021-03-04T11:42:17.383+00:00

How can I receive more data instead of only 12 bytes? I also want to know if there is any way to calculate the length of data present in the ISU ports? I have been trying to receive the data from click boards using RTApp and transfer it to shared buffer and then by using High-Level App to display the data in Visual Studio. But I haven't made any progress. I was not able to transfer data to the buffer without knowing the length of the data in the ISU port. I got an error when I used the "sizeof" function. Is there any possible way to do it. Please guide me with what I have to do next... Thank you

Azure Sphere
Azure Sphere
An Azure internet of things security solution including hardware, operating system, and cloud components.
156 questions
Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
323 questions
{count} votes

2 answers

Sort by: Most helpful
  1. matsujirushi 636 Reputation points MVP
    2021-03-05T00:26:49.653+00:00

    Hi @NishithVPoojary-0251 ,
    UART is byte stream interface.
    If you want to split it into specific lengths, you have to implement the code.

    Sample code is here.
    The received data is stored in the ReceiveBuffer, and meaningful chunks of data are passed to the MessageReceivedHandler.

    https://github.com/matsujirushi/uart-to-azureiot/blob/master/app/uart-to-azureiot-hlapp/main.c#L254

    1 person found this answer helpful.
    0 comments No comments

  2. QuantumCache 20,026 Reputation points
    2021-03-10T05:20:58.057+00:00

    Hello @NishithVPoojary-0251
    Just checking in if you have had a chance to see the previous response.
    Please enable your preferred alert types on your Profile's Settings to get instant notifications on this thread's discussions. Here is how to subscribe to a notification.

    In addition to the info shared by Matsujirushi, please also have a look at the below document.

    Azure Sphere – UART - Code Samples | Microsoft Learn

    UART documentation here provides info on how to update the baud rate. Can you check if the customer has tried these and if so, their outcomes?

    Please comment below if you need further help in this matter.

    If a response is helpful, please click "Accept Answer" and upvote it.