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.

IWR6843: Flash over SPI using bootloader: Unknown error from AWR_DEV_FILE_DOWNLOAD_MSG

Part Number: IWR6843

I am trying to flash an IWR6843 over SPI.

At boot I get the AWR_DEV_ASYNC_EVENT_MSG with "power up done" as expected. I then send AWR_DEV_FILE_DOWNLOAD_MSG with 250 bytes of payload and I get an error without payload.

What is wrong here? The error package says there is 1 subblock, but the length of the message is 12 bytes so there is no room for it.

There is no flash connected to the IWR6843. I would rather boot from RAM (well -- load from master CPU each boot). I have based this on https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/1023/AWR1xx_5F00_Radar_5F00_Interface_5F00_Control.pdf and http://www.ti.com/lit/an/swra627/swra627.pdf .

I am attaching the Saleae screenshot and export.

Time [s],Packet ID,MOSI,MISO
-0.010077720000000,0,0x00,0xFF
-0.009887720000000,0,0x00,0xFF
-0.007725080000000,1,0x56,0xFF
-0.007535080000000,1,0x78,0xFF
-0.006607180000000,2,0x87,0xFF
-0.006417180000000,2,0x65,0xFF
-0.005494400000000,3,0xFF,0xFF
-0.005304400000000,3,0xFF,0xFF
-0.004354740000000,4,0xFF,0xFF
-0.004164740000000,4,0xFF,0xFF
-0.003239160000000,5,0xFF,0xFF
-0.003049160000000,5,0xFF,0xFF
-0.002125540000000,6,0xFF,0xFF
-0.001935540000000,6,0xFF,0xFF
-0.001012620000000,7,0xFF,0xFF
-0.000822620000000,7,0xFF,0xFF
0.000099980000000,8,0xFF,0xDC
0.000289980000000,8,0xFF,0xBA
0.011291360000000,9,0x00,0xAB
0.011481360000000,9,0x00,0xCD
0.012505400000000,10,0x00,0xA0
0.012695400000000,10,0x00,0x36
0.013710260000000,11,0x00,0x00
0.013900260000000,11,0x00,0x22
0.014913900000000,12,0x00,0x00
0.015103900000000,12,0x00,0x0C
0.016128860000000,13,0x00,0x00
0.016318860000000,13,0x00,0x00
0.017332940000000,14,0x00,0x00
0.017522940000000,14,0x00,0x01
0.018537620000000,15,0x00,0x5F
0.018727640000000,15,0x00,0x9A
0.019754700000000,16,0x00,0x50
0.019944700000000,16,0x00,0x00
0.020959780000000,17,0x00,0x00
0.021149780000000,17,0x00,0x14
0.022162940000000,18,0x00,0x00
0.022352960000000,18,0x00,0x00
0.023366140000000,19,0x00,0x00
0.023556140000000,19,0x00,0x00
0.024569040000000,20,0x00,0x56
0.024759040000000,20,0x00,0xF3
0.025786300000000,21,0x00,0x00
0.025976300000000,21,0x00,0x05
0.027009780000000,22,0x00,0x00
0.027199780000000,22,0x00,0x00
0.028214020000000,23,0x00,0x00
0.028404020000000,23,0x00,0x00
0.029417940000000,24,0x00,0x00
0.029607940000000,24,0x00,0x00
0.030621240000000,25,0x00,0x00
0.030811240000000,25,0x00,0x00
0.031824540000000,26,0x00,0x1B
0.032014540000000,26,0x00,0x37
0.034307160000000,27,0x00,0xFF
0.034497160000000,27,0x00,0xFF
0.035639300000000,28,0x00,0xFF
0.035829300000000,28,0x00,0xFF
0.037915680000000,29,0x56,0xFF
0.038105680000000,29,0x78,0xFF
0.039030120000000,30,0x87,0xFF
0.039220120000000,30,0x65,0xFF
0.040143140000000,31,0xFF,0xFF
0.040333140000000,31,0xFF,0xFF
0.041256100000000,32,0xFF,0xFF
0.041446100000000,32,0xFF,0xFF
0.042368480000000,33,0xFF,0xFF
0.042558480000000,33,0xFF,0xFF
0.043481160000000,34,0xFF,0xFF
0.043671160000000,34,0xFF,0xFF
0.044594040000000,35,0xFF,0xFF
0.044784040000000,35,0xFF,0xFF
0.045718720000000,36,0xFF,0xFF
0.045908720000000,36,0xFF,0xFF
0.056942460000000,37,0x00,0xFF
0.057132460000000,37,0x00,0xFF
0.058175540000000,38,0x00,0xFF
0.058365540000000,38,0x00,0xFF
0.059402720000000,39,0x12,0xFF
0.059592720000000,39,0x34,0xFF
0.060556080000000,40,0x43,0xFF
0.060746080000000,40,0x21,0xFF
0.061676100000000,41,0x81,0xFF
0.061866100000000,41,0x05,0xFF
0.062789740000000,42,0x00,0xFF
0.062979740000000,42,0xFA,0xFF
0.063902620000000,43,0x03,0x00
0.064092620000000,43,0x00,0x00
0.065015360000000,44,0x36,0x00
0.065205360000000,44,0x61,0x00
0.066139660000000,45,0x00,0x00
0.066329660000000,45,0x01,0x00
0.067254560000000,46,0x44,0x00
0.067444560000000,46,0x9E,0x00
0.068367180000000,47,0x7C,0xFF
0.068557180000000,47,0x58,0xFF
0.069479900000000,48,0x00,0xFF
0.069669900000000,48,0xFA,0xFF
0.070593460000000,49,0x03,0xFF
0.070783460000000,49,0x00,0xFF
0.071705580000000,50,0x36,0xFF
0.071895580000000,50,0x61,0xFF
0.072817640000000,51,0x00,0xFF
0.073007640000000,51,0x01,0xFF
0.073929760000000,52,0x44,0xFF
0.074119760000000,52,0x9E,0xFF
0.175158960000000,53,0x7F,0xFF
0.175348960000000,53,0x45,0xFF
0.186359600000000,54,0x4C,0xFF
0.186549600000000,54,0x46,0xFF
0.197545460000000,55,0x01,0xFF
0.197735460000000,55,0x01,0xFF
0.208734280000000,56,0x01,0xFF
0.208924280000000,56,0x00,0xFF
0.219919080000000,57,0x00,0xFF
0.220109080000000,57,0x00,0xFF
0.231103300000000,58,0x00,0xFF
0.231293300000000,58,0x00,0xFF
0.242286620000000,59,0x00,0xFF
0.242476620000000,59,0x00,0xFF
0.253469860000000,60,0x00,0xFF
0.253659860000000,60,0x00,0xFF
0.264653140000000,61,0x02,0xFF
0.264843140000000,61,0x00,0xFF
0.275838420000000,62,0x28,0xFF
0.276028420000000,62,0x00,0xFF
0.287022580000000,63,0x01,0xFF
0.287212580000000,63,0x00,0xFF
0.298206020000000,64,0x00,0xFF
0.298396020000000,64,0x00,0xFF
0.309388920000000,65,0x80,0xFF
0.309578920000000,65,0x2F,0xFF
0.320572060000000,66,0x01,0xFF
0.320762060000000,66,0x00,0xFF
0.331754820000000,67,0xAC,0xFF
0.331944820000000,67,0xFC,0xFF
0.342938040000000,68,0x2F,0xFF
0.343128040000000,68,0x00,0xFF
0.354121120000000,69,0x2C,0xFF
0.354311120000000,69,0xFD,0xFF
0.365308180000000,70,0x2F,0xFF
0.365498180000000,70,0x00,0xFF
0.376496040000000,71,0x00,0xFF
0.376686040000000,71,0x00,0xFF
0.387713900000000,72,0x00,0xFF
0.387903900000000,72,0x05,0xFF
0.398903180000000,73,0x34,0xFF
0.399093180000000,73,0x00,0xFF
0.410087820000000,74,0x20,0xFF
0.410277820000000,74,0x00,0xFF
0.421270900000000,75,0x04,0xFF
0.421460900000000,75,0x00,0xFF
0.432453720000000,76,0x28,0xFF
0.432643720000000,76,0x00,0xFF
0.443636920000000,77,0x1D,0xFF
0.443826920000000,77,0x00,0xFF
0.454819020000000,78,0x1C,0xFF
0.455009020000000,78,0x00,0xFF
0.466004020000000,79,0x18,0xFF
0.466194020000000,79,0xF0,0xFF
0.477186580000000,80,0x9F,0xFF
0.477376580000000,80,0xE5,0xFF
0.488370820000000,81,0x18,0xFF
0.488560820000000,81,0xF0,0xFF
0.499553560000000,82,0x9F,0xFF
0.499743560000000,82,0xE5,0xFF
0.510736480000000,83,0x18,0xFF
0.510926480000000,83,0xF0,0xFF
0.521919320000000,84,0x9F,0xFF
0.522109320000000,84,0xE5,0xFF
0.533101940000000,85,0x18,0xFF
0.533291940000000,85,0xF0,0xFF
0.544284420000000,86,0x9F,0xFF
0.544474420000000,86,0xE5,0xFF
0.555468020000000,87,0x18,0xFF
0.555658020000000,87,0xF0,0xFF
0.566651020000000,88,0x9F,0xFF
0.566841020000000,88,0xE5,0xFF
0.577845340000000,89,0x18,0xFF
0.578035340000000,89,0xF0,0xFF
0.589033660000000,90,0x9F,0xFF
0.589223660000000,90,0xE5,0xFF
0.600217200000000,91,0x18,0xFF
0.600407200000000,91,0xF0,0xFF
0.611401100000000,92,0x9F,0xFF
0.611591100000000,92,0xE5,0xFF
0.622584180000000,93,0xB0,0xFF
0.622774180000000,93,0xF1,0xFF
0.633767600000000,94,0x1F,0xFF
0.633957600000000,94,0xE5,0xFF
0.644950660000000,95,0x80,0xFF
0.645140660000000,95,0x2F,0xFF
0.656135520000000,96,0x01,0xFF
0.656325520000000,96,0x00,0xFF
0.668099220000000,97,0x44,0xFF
0.668289220000000,97,0xDE,0xFF
0.679329280000000,98,0x00,0xFF
0.679519280000000,98,0x00,0xFF
0.690519000000000,99,0x44,0xFF
0.690709000000000,99,0xDE,0xFF
0.701704380000000,100,0x00,0xFF
0.701894380000000,100,0x00,0xFF
0.712892060000000,101,0x44,0xFF
0.713082060000000,101,0xDE,0xFF
0.724078860000000,102,0x00,0xFF
0.724268860000000,102,0x00,0xFF
0.735265500000000,103,0xAC,0xFF
0.735455500000000,103,0xDE,0xFF
0.746483820000000,104,0x00,0xFF
0.746673820000000,104,0x00,0xFF
0.757670840000000,105,0x44,0xFF
0.757860840000000,105,0xDE,0xFF
0.768855940000000,106,0x00,0xFF
0.769045940000000,106,0x00,0xFF
0.780042800000000,107,0x90,0xFF
0.780232800000000,107,0x10,0xFF
0.791227540000000,108,0x01,0xFF
0.791417540000000,108,0x00,0xFF
0.802411540000000,109,0x2D,0xFF
0.802601540000000,109,0xE9,0xFF
0.813595780000000,110,0xF8,0xFF
0.813785780000000,110,0x43,0xFF
0.824779280000000,111,0x58,0xFF
0.824969280000000,111,0x2B,0xFF
0.835927400000000,112,0x80,0xFF
0.836117400000000,112,0x46,0xFF
0.847117100000000,113,0x17,0xFF
0.847307100000000,113,0x46,0xFF
0.858302100000000,114,0x08,0xFF
0.858492100000000,114,0x9C,0xFF
0.869484120000000,115,0x0C,0xFF
0.869674120000000,115,0xBF,0xFF
0.880669420000000,116,0xBD,0xFF
0.880859420000000,116,0xA5,0xFF
0.891854100000000,117,0xC1,0xFF
0.892044100000000,117,0xA5,0xFF
0.903038220000000,118,0x00,0xFF
0.903228220000000,118,0x29,0xFF
0.914222500000000,119,0x08,0xFF
0.914412500000000,119,0xBF,0xFF
0.925409740000000,120,0xB8,0xFF
0.925599740000000,120,0xF1,0xFF
0.936594520000000,121,0x00,0xFF
0.936784520000000,121,0x0F,0xFF
0.947779420000000,122,0x4F,0xFF
0.947969420000000,122,0xEA,0xFF
0.958963740000000,123,0xE7,0xFF
0.959153740000000,123,0x79,0xFF
0.970146060000000,124,0x05,0xFF
0.970336060000000,124,0xD1,0xFF
0.981330680000000,125,0x20,0xFF
0.981520680000000,125,0x68,0xFF
0.992514700000000,126,0x30,0xFF
0.992704700000000,126,0x27,0xFF
1.003698460000000,127,0x41,0xFF
1.003888460000000,127,0x1E,0xFF
1.014882400000000,128,0x21,0xFF
1.015072400000000,128,0x60,0xFF
1.026068680000000,129,0x07,0xFF
1.026258680000000,129,0x70,0xFF
1.037317100000000,130,0x27,0xFF
1.037507100000000,130,0xE0,0xFF
1.048639480000000,131,0x3E,0xFF
1.048829480000000,131,0x46,0xFF
1.059926760000000,132,0x08,0xFF
1.060116760000000,132,0x3E,0xFF
1.071157500000000,133,0x13,0xFF
1.071347500000000,133,0xD0,0xFF
1.082354380000000,134,0x08,0xFF
1.082544380000000,134,0x3E,0xFF
1.093575480000000,135,0x0D,0xFF
1.093765480000000,135,0xD0,0xFF
1.104770000000000,136,0x00,0xDC
1.104960000000000,136,0x29,0xBA
1.115958720000000,137,0x08,0xAB
1.116148720000000,137,0xBF,0xCD
1.127142040000000,138,0xB0,0xA0
1.127332040000000,138,0xF1,0x36
1.138324860000000,139,0xFF,0x00
1.138514860000000,139,0x3F,0x22
1.149513080000000,140,0x04,0x00
1.149703080000000,140,0xD9,0x0C
1.160704820000000,141,0x3A,0x00
1.160894820000000,141,0x46,0x00
1.171902060000000,142,0x4B,0x00
1.172092060000000,142,0x46,0x01
1.183093420000000,143,0x04,0x5F
1.183283420000000,143,0xF0,0x9A
1.194279880000000,144,0x9A,0x50
1.194469880000000,144,0xEC,0x00
1.205466200000000,145,0x0B,0x00
1.205656200000000,145,0xE0,0x14
1.216650020000000,146,0xB0,0x00
1.216840020000000,146,0xFB,0x00
1.227834620000000,147,0xF7,0x00
1.228024620000000,147,0xF0,0x00
1.239018380000000,148,0x00,0x56
1.239208380000000,148,0x21,0xF3
1.250204540000000,149,0x07,0x00
1.250394540000000,149,0xE0,0x05
1.261388800000000,150,0x0A,0x00
1.261578800000000,150,0x07,0x00
1.272573540000000,151,0x09,0x00
1.272763540000000,151,0x09,0x00
1.283756320000000,152,0x00,0x00
1.283946320000000,152,0x09,0x00
1.294939660000000,153,0x02,0x00
1.295129660000000,153,0xE0,0x00
1.306124620000000,154,0x4A,0x1B
1.306314620000000,154,0x07,0x37
1.317308620000000,155,0xC9,0xFF
1.317498620000000,155,0x08,0xFF
1.328491440000000,156,0xC0,0xFF
1.328681440000000,156,0x08,0xFF
1.339674960000000,157,0x10,0xFF
1.339864960000000,157,0x43,0xFF
1.350858500000000,158,0x22,0xFF
1.351048500000000,158,0x68,0xFF
1.362042200000000,159,0x00,0xFF
1.362232220000000,159,0xFB,0xFF
1.373279320000000,160,0x17,0xFF
1.373469340000000,160,0x83,0xFF
1.384502040000000,161,0x56,0xFF
1.384692060000000,161,0x1E,0xFF
1.395691780000000,162,0x00,0xFF
1.395881780000000,162,0x29,0xFF
1.406877600000000,163,0x26,0xFF
1.407067620000000,163,0x60,0xFF
1.418063520000000,164,0xEB,0xFF
1.418253540000000,164,0x5C,0xFF
1.429248220000000,165,0x13,0xFF
1.429438220000000,165,0x70,0xFF
1.461859820000000,166,0x56,0xFF
1.462049820000000,166,0x78,0xFF
1.462986580000000,167,0x87,0xFF
1.463176580000000,167,0x65,0xFF
1.464104720000000,168,0xFF,0xFF
1.464294720000000,168,0xFF,0xFF
1.465221820000000,169,0xFF,0xFF
1.465411820000000,169,0xFF,0xFF
1.466342580000000,170,0xFF,0xFF
1.466532580000000,170,0xFF,0xFF
1.467460100000000,171,0xFF,0xFF
1.467650100000000,171,0xFF,0xFF
1.468576360000000,172,0xFF,0xFF
1.468766360000000,172,0xFF,0xFF
1.469692880000000,173,0xFF,0xFF
1.469882880000000,173,0xFF,0xFF
1.480877000000000,174,0x00,0xDC
1.481067000000000,174,0x00,0xBA
1.482084980000000,175,0x00,0xAB
1.482274980000000,175,0x00,0xCD
1.483294720000000,176,0x00,0x00
1.483484720000000,176,0x00,0x16
1.484502360000000,177,0x00,0x00
1.484692360000000,177,0x00,0x0C
1.485712340000000,178,0x00,0x03
1.485902360000000,178,0x00,0x0C
1.486920720000000,179,0x00,0x00
1.487110720000000,179,0x00,0x00
1.488128180000000,180,0x00,0x00
1.488318180000000,180,0x00,0x01
1.489335940000000,181,0x00,0xFC
1.489525960000000,181,0x00,0xD0
1.491787100000000,182,0x00,0xFF
1.491977100000000,182,0x00,0xFF
1.494060620000000,183,0x56,0xFF
1.494250620000000,183,0x78,0xFF
1.495176920000000,184,0x87,0xFF
1.495366920000000,184,0x65,0xFF
1.496296180000000,185,0xFF,0xFF
1.496486180000000,185,0xFF,0xFF
1.497413360000000,186,0xFF,0xFF
1.497603360000000,186,0xFF,0xFF
1.498529900000000,187,0xFF,0xFF
1.498719900000000,187,0xFF,0xFF
1.499645980000000,188,0xFF,0xFF
1.499835980000000,188,0xFF,0xFF
1.500762980000000,189,0xFF,0xFF
1.500952980000000,189,0xFF,0xFF
1.501879940000000,190,0xFF,0xFF
1.502069940000000,190,0xFF,0xFF
1.513061840000000,191,0x00,0xFF
1.513251840000000,191,0x00,0xFF
1.514270560000000,192,0x00,0xFF
1.514460560000000,192,0x00,0xFF
1.516545060000000,193,0x56,0xFF
1.516735060000000,193,0x78,0xFF
1.517662160000000,194,0x87,0xFF
1.517852160000000,194,0x65,0xFF
1.518778760000000,195,0xFF,0xFF
1.518968760000000,195,0xFF,0xFF
1.519896020000000,196,0xFF,0xFF
1.520086020000000,196,0xFF,0xFF
1.521012920000000,197,0xFF,0xFF
1.521202920000000,197,0xFF,0xFF
1.522129820000000,198,0xFF,0xFF
1.522319820000000,198,0xFF,0xFF
1.523251200000000,199,0xFF,0xFF
1.523441200000000,199,0xFF,0xFF
1.524368460000000,200,0xFF,0xFF
1.524558460000000,200,0xFF,0xFF
1.535554400000000,201,0x00,0xFF
1.535744400000000,201,0x00,0xFF
1.536763240000000,,0x00,0xFF
1.536953240000000,,0x00,0xFF

  • Adding screenshot. The pasted image did not stick to the post.

  • Hi,

    Are you using radar studio?
    Please provide some more details on the setup

    Regards,
    Charles O
  • The card I use is a custom board based on IWR6843ISK

    The current code is a custom implementation. It talks over SPI from a SoC running Linux. The current plan is for this to end up in a kernel driver that loads the firmware as a part of the boot process, so I would prefer as little bloating as possible and once the firmware is loaded this code has done its job.

    That is how I started and when I realized there was a library in mmwave_sdk I also tried to do an implementation using that, but it was an uphill battle with all the callbacks needed just to try it out -- and the main problem right now is an error message without payload.

    The image I am trying to upload is the .xer4f file for the MSS. I have been able to load this as a part of the bundle one is able to send to the device via UART (tried back when I had the flash mounted though).

    In my eyes, the most curious thing right now is that there is no payload for the error message so I have no idea what the chip think is wrong. This is my debug output from the program I am running. This is how I see reality from my code (and I think I got all endian conversions right).

    RECEIVED:
    sync          : abcddcba
    opcode.id     : 0x280 AWR_DEV_ASYNC_EVENT_MSG
    opcode.type   : 11 ASYNC
    opcode.dir    : 0110 Communication between Master to Host
    flag_retry    : 00 New message
    flag_ackreq   : 11 Acknowledgement is not requested for the current message
    flag_prot.ver.: 0
    flag_crc_req  : 00 CRC is appended to the message
    flag_crc_len  : 00 16-bit CRC
    flag_seq_num  : 0
    msglen        : 34
    remchunks     : 0
    nsbc          : 1
    chksum        : 5f9a
    PUD status 0 after 1749.695000 us

    SENT:
    opcode.id     : 0x204 AWR_DEV_FILE_DOWNLOAD_MSG
    opcode.type   : 00 COMMAND
    opcode.dir    : 0101 Communication between Host to Master
    flag_retry    : 00 New message
    flag_ackreq   : 00 Acknowledgement is requested for the current message
    flag_prot.ver.: 0
    flag_crc_req  : 11 CRC is not appended to the message
    flag_crc_len  : 00 16-bit CRC
    flag_seq_num  : 0
    msglen        : 250
    remchunks     : 13921
    nsbc          : 1
    chksum        : 449e

    RECEIVED (while still sending the previous message):
    sync          : abcddcba
    opcode.id     : 0x280 AWR_DEV_ASYNC_EVENT_MSG
    opcode.type   : 11 ASYNC
    opcode.dir    : 0110 Communication between Master to Host
    flag_retry    : 00 New message
    flag_ackreq   : 11 Acknowledgement is not requested for the current message
    flag_prot.ver.: 0
    flag_crc_req  : 00 CRC is appended to the message
    flag_crc_len  : 00 16-bit CRC
    flag_seq_num  : 0
    msglen        : 34
    remchunks     : 0
    nsbc          : 1
    chksum        : 5f9a
    PUD status 0 after 1749.695000 us

    RECEIVED (after the sent package was completed):
    sync          : abcddcba
    opcode.id     : 0x00 AWR_ERROR_MSG
    opcode.type   : 01 RESPONSE (ACK or ERROR)
    opcode.dir    : 0110 Communication between Master to Host
    flag_retry    : 00 New message
    flag_ackreq   : 11 Acknowledgement is not requested for the current message
    flag_prot.ver.: 0
    flag_crc_req  : 11 CRC is not appended to the message
    flag_crc_len  : 00 16-bit CRC
    flag_seq_num  : 0
    msglen        : 12
    remchunks     : 0
    nsbc          : 1
    chksum        : fcd0

  • Hi,

    Can you send me a direct message with some more details on the project. What mode is the board during bootup?, Why are you building the board without SFlash ? Why are you loading .xer4f instead of a .Bin etc.
    Flashing the board through UART is the only supported mode at the moment, however other alternatives can be suggested with better understanding of the project as a whole.

    Regards,
    Charles O
  • This issue is being handled offline