[Cryptech Tech] USART3 comms

Michael Dockter dockter at dkey.org
Sun Feb 10 17:58:29 UTC 2019


I'm implementing a comm channel between the ST and the AVR processors. I'm almost there but I am only getting the first byte received. See the screenshot below of the captured comms.


[https://attachments.office.net/owa/dockter@dkey.org/service.svc/s/GetFileAttachment?id=AAMkADU0ZWMwZWRhLTllNmUtNDkzMi1hZGU3LTQ4NjcyYzU4NTEzYQBGAAAAAAA5fdV5bhU9R6Ksdi%2FQmxWhBwAQfVOspQ1XQYl65r7rp1PsAAAAAAEJAAAQfVOspQ1XQYl65r7rp1PsAACftDN7AAABEgAQAG%2BJ%2BMAXr7hAiYVILMqmJIc%3D&X-OWA-CANARY=hKknCgeN4USkWxFsY2tO9fBj-baAj9YYJczEczpmLzQhl5pgKnopyfqsGpxOEaLhR51QIU8eTkw.&token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjA2MDBGOUY2NzQ2MjA3MzdFNzM0MDRFMjg3QzQ1QTgxOENCN0NFQjgiLCJ4NXQiOiJCZ0Q1OW5SaUJ6Zm5OQVRpaDhSYWdZeTN6cmciLCJ0eXAiOiJKV1QifQ.eyJ2ZXIiOiJFeGNoYW5nZS5DYWxsYmFjay5WMSIsImFwcGN0eHNlbmRlciI6Ik93YURvd25sb2FkQGMxNTM3MmU4LWFlMzMtNGM2Yy1hZjNmLTU2NzEzOTY5YjViNiIsImFwcGN0eCI6IntcIm1zZXhjaHByb3RcIjpcIm93YVwiLFwicHJpbWFyeXNpZFwiOlwiUy0xLTUtMjEtNjkwNTQ2OTc0LTMzNTcyMDc1NTUtNDAzMTA1MDk4NS0yOTY5MTEzXCIsXCJwdWlkXCI6XCIxMTUzNzY1OTMyNDEzMTgzNjQ0XCIsXCJvaWRcIjpcImI1YWM4MThkLWU1OGItNDY5MC05NGY5LWY4OWEyMTAzOWM5NFwiLFwic2NvcGVcIjpcIk93YURvd25sb2FkXCJ9IiwibmJmIjoxNTQ5ODIwOTczLCJleHAiOjE1NDk4MjE1NzMsImlzcyI6IjAwMDAwMDAyLTAwMDAtMGZmMS1jZTAwLTAwMDAwMDAwMDAwMEBjMTUzNzJlOC1hZTMzLTRjNmMtYWYzZi01NjcxMzk2OWI1YjYiLCJhdWQiOiIwMDAwMDAwMi0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvYXR0YWNobWVudHMub2ZmaWNlLm5ldEBjMTUzNzJlOC1hZTMzLTRjNmMtYWYzZi01NjcxMzk2OWI1YjYifQ.XVOVspqgRL3CLiDkN5il1PNj5hyKSQZmGt_Ol8a9_IXqoO09iQjghk4X3t_NC-RbucIzetV9le0OdP6HDTGyCwiNdjzhhXXsQ2HFRpn0qT-kwCrwEw5jpgMHoSGHMYtMk5M0tQcH3QcrXg-Cxkdlm54ni-4bXf3HiT-QhJoK6zdfGnxk3DOV9pOjz3cB84voXj_QkaGvZTzrOljFVrUoioR-FiCBz7ca2eSAn0aum8xffjimP7EQtIcKi0Sj0YqzpDE9DBnb4_GFpzo7iq29ooBjqaAnYfM8ho4swg2yGqa3TsOOX5Mmids16zRUwzxYbLmZcqkn4X_dqZsXqp_mGg&owa=outlook.office.com&isImagePreview=True]

I've modified uart-test.c and all I get is the first returned byte 0x14 with either separate uart_recv_char2 calls or uart_receive_bytes2 call to a buffer large enough to receive the response shown above.


while (1) {
    led_toggle(LED_GREEN);

    //uart_send_char2(STM_UART_USER, tx + upper);
    //uart_send_char2(STM_UART_MGMT, tx + upper);
    //uart_send_char2(STM_UART_TMPR, tx + upper);
    uart_send_char2(STM_UART_TMPR, STK_GET_PARAMETER);
    uart_send_char2(STM_UART_TMPR, STK_SW_MAJOR);
    uart_send_char2(STM_UART_TMPR, sp);

    DELAY_SH();

    if (uart_receive_bytes2(STM_UART_TMPR, &rx1, 5, 1 ) == HAL_OK)
            /*uart_recv_char2(STM_UART_TMPR, &rx, 0) == HAL_OK)*/
            {

        //uart_recv_char2(STM_UART_TMPR, &rx1, 0);
        //uart_recv_char2(STM_UART_TMPR, &rx2, 0);
        //uart_recv_char2(STM_UART_TMPR, &rx3, 0);
        led_toggle(LED_YELLOW);
        if (rx1[1]== 0x55) {
            led_toggle(LED_RED);
        }
    }
Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cryptech.is/archives/tech/attachments/20190210/af2c0ddc/attachment.html>


More information about the Tech mailing list