UART Boot/Programming: Questions regarding UM-B-119 Section 6

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
gme_johannes
Offline
Last seen: 7 months 1 week ago
Joined: 2017-12-22 10:09
UART Boot/Programming: Questions regarding UM-B-119 Section 6

Hi PM_Dialog,

in https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl... you pointed me to the document http://lpccs-docs.dialog-semiconductor.com/UM-B-119_DA14585-DA14531_SW_P... in my endeavour to program the ISM14585 through UART (avoiding SST).

I followed it as you suggeted and successfully loaded flash_programmer.bin. However.. I have some questions regarding the document. 

(1) Section 6.1.4.2
I noticed that the ACK from 14585 is received after LEN_MSB byte (Basic), and if I continue to send 0x00 0x00 as LEN_LSB byte (Extended)/LEN_MSB byte (Extended), this is taken by the 14585 as the first two bytes of the transfered binary.
It is stated that "The DA14585/586 answers with 0x06 (ACK) if the 3 bytes have been received [...]", but it was not clear that in that case the last "Extended" bytes should not be send. Is that correct? I would suggest to clarify it in the document.

(2) Section 6.4.2.1
It is stated that to change the default UART port/speed: " This can be changed by appending to the binary 1 byte."
This is unclear. To which binary? When booting the flash programmer through UART, I can extend the flash programmer binary by a byte with the coneten of the "Selector" value in the table?

(3) Section 6.4.4.4
Although the message section contains only 1 byte (the Op Code 0x10), the length is 0x07. It is unclear why this is the case. Are 6 bytes missing after the Op Code? Should the lenght be 0x01 instead? Do I have to transfer something in addition after the Op Code?

(4) Section 6.4.4.4.3
What is "data to write" in the case of ACTION_SPI_READ? What data does the DA14585 expect, when I only want to send a request to read? It should only require memory address and length.

(5) Section 6.4.2
While for other sections it is stated how the CRC is calculated (e.g. 1 byte successive XOR-ing with initial values 0x00 or 0xFF) it is not stated how the 32bit CRC is calculated for the UART transmissions with the flash_programmer.bin

(6) Section 6.1.4.2
When booting into my flash_programmer.bin with length 0x2354, it is (so far) working as expected, I receive "Hello". I observed with a sniffer that Smart Snippets appends 5 bytes to the binary, which are 0x0000000004. Also this case seems to work. What are the additional 5 bytes for?

Thanks,

Johannes

Editing:
- Apologies, I edited my text after I came up with more questions. My original question is now (1)
- added questions (2)-(4)
- added question (5)
- added question (6)

Device: 
PM_Dialog
Offline
Last seen: 2 days 10 hours ago
Staff
Joined: 2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

Thanks for your questions. Let me check them and I’ll get back to you.

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen: 2 days 10 hours ago
Staff
Joined: 2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

I have escalated all your questions internally to check them out.

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen: 2 days 10 hours ago
Staff
Joined: 2018-02-08 11:03
Hi gme_johannes,

Hi gme_johannes,

Apologies for the delay. Please find below the comments from the Team internally :

A1/ Agreed, need to be clarified, 2 Bytes + SOH. See attached.

A2/ A re-phrase is needed here, but the information is correct.

A3/ Yes, UART request and UART response LEN should be 0x01

A4/ No this the Data to read:

int8_t spi_flash_read_data(uint8_t *rd_data_ptr, uint32_t address, uint32_t size, uint32_t *actual_size)

A5/ Section 6.1.4.2 :

CRC is calculated by XORing every successive byte with the previous value. Initial CRC value is 0x00

A6/ No this are only 5 bytes -  see attached

printf_string(UART, "HELLO");

Thanks, PM_Dialog

Attachment: