Hi, Dialog,
the target board : DA14580 Development Kit-Pro.
My developing environment is the same as before post. ->http://support.dialog-semiconductor.com/dsps-ext-sleep-current-too-large
The last post, I wrote the firmware to SysRAM via UART.
Now, I should send DA14580 Development Kit-Pro to android app. developer who should make the DSPS communication program.
Therefore, I should write the firmware DSPS to flash memory. The dev.kit-pro should be booted from flash memory.
我试着或者说是itting the firmware to flash memory using Snippets's "SPI flash programmer". The Log shows the success writting.
However, the dev.kit-pro can not boot from flash.
I don't know what should I do more something.
May be "sps_device Keil project should be modified? or Jump need to boot from flash? or Smart Snippets's configuration should be modified? ...etc,.. Now I'm very confused.
What preperation should be done to boot from flash?
Please, show me the step by step procedure.
Hi igotit,
Please refer to document AN-B-023 interfacing with external memory, you can find a guide about how to program the spi and boot from it. Note: you must erase the flash before writing anything in it.
Thanks MT_dialog
I tried as following procedure and the board is now boot from SPI flash memory.
The firmware : DSPS sps_device.hex enabled both ext_sleep and UART H/W flow control.
step1. DA14580 dev.kit.-pro J5 Jump setting as SPI support from Fig.6 page 16 on the manul (http://support.dialog-semiconductor.com/download/file/fid/941)
step2. Smart Snippet's first dialog(dialog bar title is Project and Virtual COM port / JATG selection) I select the JTAG.
step3. Click the "SPI Flash Programmer" and then click the button "connect" -> "erase" -> "erase sector" and finally click the button "Burn" . all of this process is success.
step4. finally I press the H/W reset button on the DA14580 dev.kit-pro.
step5. Check the DSPS Advertising and Connection working well from the DSPS Android app.
Above process show the good working for writing spi memeory and booting from spi memory.
However, the problems is as follows
1. the DSPS firmware is configured as UART H/W flow control. So we should set the J5 Jump as Fig16. page 31 of the DSPS manualhttp://support.dialog-semiconductor.com/download/file/fid/895
If this h/w flow control jump setting is applied, the above step1's SPI bootable jump setting can not be applied therefore the board can not boot from spi memory.
Finally, we need the following functions da14580 dev.kit-pro.
function 1. if our android app. developer just turn on(USB connection to PC) the dev.kit-pro then the DSPS is loaded and working state. (i.e. boot from SPI memory on mother board)
function 2. the pc s/w ( hyper terminal or tera term) can be communicate with DA14580.
function 3. the android app. developer should testing his application codes using above function2. i.e Bidirectional Tx/Rx Communication testing environment using the pc's terminal s/w.
How can I achieve this functionality using DA14580 dev.kit-pro (DSPS firmware written) ?
Hi igotit,
You can change the pin map of the default UART pins in order to use the UART and the SPI for example use pins P0_4, P0_2, P1_1, P1_3.
Since the firmware is loaded into the SPI after every reset or power on the device is going to be ready to use. The communication is birectional by default.
Thanks MT_dialog
Hi, MT_dialog,
O.K. I got it! Thanks again,
Procedure for solving the problem.
1. periph_setup.h. modified as following, and then build project
P0.2 - UART1 CTS,
P1.1 - UART1 RTS (changed from P0.3)
P0.4 - UART1 TX
P1.3 UART1 RX (changed from P0.5)
2. Using smart snippets write to SPI flash memory.
- the same as step1,2,3,4,5 I wrote above reply post.
3. Add Jump for DA14580 UART connection to FTDI USB chip pin.
- you can see the detail information from this picture. ->http://cfile8.uf.tistory.com/original/273F063B55C35E411BB887
That'all.
Now the dev.kit-pro is bootable from the spi flash memory , and PC's hyperterminal working well with on board DA14580.
Hi igotit,
Thanks for sharing with so much detail.
MT_dialog
Hi all.
on Step #3
the point 3 says
"...step3. Click the "SPI Flash Programmer" and then click the button "connect" -> "erase" -> "erase sector" and finally click the button "Burn" . all of this process is success...."
My question is, can I program the SPI Flash, using the UART ?
Is this possible on a complete new chip (exit from factory) ?
I read in the AN-B-023 that should be possible (chapter 6)
"..SmartSnippets is the appropriated tool to download your application into the external memory very
easily. It can be downloaded fromhttp://support.dialog-semiconductor.com/software-downloads.
Using the development kit, there are two possibilities to download the image into the external
memory (by either choosing UART (see figure 2 for the setting of the jumper)..."
Mik
Hi Mik,
Yes is possible to program the SPI using the UART interface. Just set the right connections for UART and SPI and you will be able to do that.
Thanks MT_dialog
Ok, so maybe is the OTP of my daughter that has been yet burned, because I can program the flash only through the JTAG.
Because I receive the following error message (usig the the default UART jumper connection on evaluation kit-pro):
[INFO @16-01-09 14:05:56] Firmware File C:\MyProgram\Hw\SmartSnippets\workspace\resources\flash_programmer.bin has been selected for downloading.
[INFO @16-01-09 14:05:56] Connection to COM128 port has successfully opened.
[INFO @16-01-09 14:05:56] Started download procedure...
[ACTION @16-01-09 14:05:57] Please press the hardware reset button on the board to start the download process.
[INFO @16-01-09 14:06:00] Reset detected
[INFO @16-01-09 14:06:01] Successfully disconnected from port COM128.
[INFO @16-01-09 14:06:01] Connection to COM128 port has successfully opened.
[INFO @16-01-09 14:06:01] Successfully disconnected from port COM128.
[INFO @16-01-09 14:06:01] Successfully downloaded firmware file to the board.
[INFO @16-01-09 14:06:01] Successfully configured SPI Flash ports and pins.
[INFO @16-01-09 14:06:14] Connection to COM128 port has successfully opened.
[ERROR @16-01-09 14:06:14] Received error message while checking whether SPI erase was successful: FFFFFFFF.
[INFO @16-01-09 14:06:14] Successfully disconnected from port COM128.
[ERROR @16-01-09 14:06:14] SPI Memory erasing failed.
No problem, instead, from the Booter tab using the UART with the same jumper configuration.
我重新开放这个线程的原因是因为we would like to use the DA14580 with an SPI and program it trough the UART.
Reading documentation and post looks like it possible, but till now I did not see on my pro-kit.
So let me ask if we are on the correct way, we would like to:
1) Download our SW on the SPI trough the UART
2) make it running after download and reset
3) do an eventual FW upgrade, again with UART
All this step we would like to do with the factory OTP ROM configuration and with the schematic U can see in attach (where basically only the CTS is moved out from the OTP default pin configuration , and our SW consider this).
Thank, Mik
Hi MIk,
I ve attached an image of a pro-kit, with the attached configuration you will be able to:
1) load the DSPS image in SPI using the UART mode using smart Snippets (or whatever you want to do with your SPI).
2) The DSPS port are configured as stated above in order to be able to boot from SPI and work with the DSPS after reset.
The configuration is:
Change the pins p_05 -> p_13 (RX) and p_03 -> p11 (RTS). The additional cable (that is placed on the jumper) is for p05 and the MISO line of the SPI.
Thanks MT_dialog
Thank Dialog for the prompt answer, give me some days to speak with our Hw Team,
Mik