DSPS project use an external Atmel processor

⚠️
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//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
43 posts / 0 new
Last post
marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
DSPS project use an external Atmel processor

Hello MT_dialog,

We have achieved the DSPS project on the DA14580 Development Kit - Basic with UART and SPI configuration. We want to use our micro controller with UART connection pins of the board to use the DA 14580 Bluetooth chip and our ATMEL processor .

How to add our code in the DSPS project and in which part of the code in keil project ? Is any further connections that is necessary to do ?

The main goal is to have the dsps with DA14580 and our processor together through uart connection.

Thanks in advance,
Marios

Device:
MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

I dont quite get the question, as far as i can tell you would like to send data from your external MCU to the 580 and those data should be pushed through bluetooth, if that is the case there is no need to change the DSPS code. The DSPS application will take the data from the UART port and channel the data through BLE to the other side of the connection, all you have to do is to configure and connect your external MCU via UART (RX/TX and RTS/CTS if you would like to use h/w flow control - which is the only possible way to transmit UART data reliably and have the 580 in extended sleep mode).

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Thanks for your quick reply!!

Thanks for your quick reply!!

Ok if I understand correctly the DSPS code is on the Da14580 when is going to be flash via JTAG from smartsnippets and the only thing that I need to configure is the code in my external processor (MCU).

And of course a data recive check function that is going to check if the data through UART that is received from DA14580 is correct and proceed with the result that we want to implement.

Please correct me if I'm wrong

Any further suggestions is much appreciated.

Thanks in advance,
Marios

MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

Yes, the DSPS is a standalone application, whatever data is presented on the UART port, it will transfer them on the other side of the connection (of course you need an appropriate client that supports the DSPS which is a Dialog propriety profile - like the DSPS Android / Ios application or another 580 running the host application of the DSPS).

I am not sure about what you mean regarding the "receive check function" can you please clarify ?

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello MT_dialog

Hello MT_dialog

Thanks for your quick reply !

We have connected our ATMEL processor with the dialog DA14580 Development Kit - Basic as follows in attached Schematic.
(DA RX -> To External ATMEL TX) and (DA TX -> To External ATMEL RX)
We have tried and the opposite connections also to our external processor.

But nothing is received in our ATMEL processor we use the official DSPS android application to send data .

1) Is anything else that we have to do with the connections ?

2) Is necessary to connect the spi connections from the DA board to our ATMEL processor to transmit the data to the other side ?
We have made the spi configuration as is in the attached Schematic.

3)where is located in the DA the vin pin 3,3 to power the board because now is only booting from the usb port.
And at last in which part of the code i need to set up the extended sleep mode for the 580 to transmit the data ?

Thanks in advance,
Marios.

附件:
MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

1) The DSPS is designed to work properly with the h/w flow control enabled, so you need also to connect the CTS/RTS, since when the sleep is enabled the external device needs to know when the 580 is awake in order to send data. Also s/w flow control is available but there will be missing data on the device.

2) No its not necessary to connect the SPI pins when you run the DSPS application unless if you intent to boot the fw from the SPI flash that the pro kit has onboard.

3) Regarding the last question, if you dont want to power the board from the USB you can attach the power on the J5 header on pin 1 (VBAT_580) but you are going to need also to download firmware somehow to the device, so you 're going to have to boot either from the SWD via keil, which requires the USB of cource or burn the OTP or the SPI or boot via UART. By default the DSPS comes pre-configured with extended sleep mode enabled, you can check that in the user_config.h file from the app_default_sleep_mode structure.

Regarding your connections, in the schematic that you have attached you have connected the RX and TX lines of the UART of the Atmel that implements the JLink is used in order to print data out from the basic kit and there is no connection between the UART ports of the 580 and your ATMEL processor, the pins that you are indicating as P04 and P05 aren't proper, on the J4 those pins are exectly the ones in front from the one that you are indicating, you can check the schematic and User manual of the basic kit for more information on that (UM-B-048 Getting Started with DA1458x), and also its recommended to use an FTDI on this and not the UART of the SEGGER MCU.

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Dear MT_dialog

Dear MT_dialog

I have changed the setting in the user_config.h file to the extended sleep mode enable
and im getting the following error when i'm trying to flash my board :

[INFO General @17-06-12 23:40:12] Could not measure total IR len. TDO is constant high.
[INFO General @17-06-12 23:40:12] Could not measure total IR len. TDO is constant high.
[INFO General @17-06-12 23:40:13] Could not measure total IR len. TDO is constant high.
[INFO General @17-06-12 23:40:13] Could not measure total IR len. TDO is constant high.
[INFO General @17-06-12 23:40:13] Could not measure total IR len. TDO is constant high.
[ERROR General @17-06-12 23:40:13] Could not read memory address 0x50003200 with function JLINKARM_ReadMemHW
[ERROR General @17-06-12 23:40:14] No known chip found while opening JLink connection. Terminating proccess...
[ERROR SPI Flash Programmer @17-06-12 23:40:14] Failed downloading firmware file to the board.
[ERROR SPI Flash Programmer @17-06-12 23:40:14] Failed configuring SPI Flash ports and pins.

i have my board in spi mode

how i can slove this issue ?

Thanks in advance,
Marios

MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

From the log that you have attached, i suppose that you are using the Smart Snippets tool in order to burn the SPI flash on your board, also i assume that you have burned an application in your SPI with the sleep enabled and after burning the sleep enabled fw, you couldn't connect with Smart Snippets and reburn your flash (i assume that the fw that you ve burned was based on an SDK older than 5.0.4). Also i assume that you are connecting to Smart Snippets through the JTAG interface. The SDK from 5.0.4 is the first SDK that keeps the debugger module of the 580 enabled even in sleep mode, all previous releases are disabling the module so when Smart Snippets tries to download the flash_programmer in order to flash the SPI memory it fails since it cannot find the debugger module on the 580. What you can do is hit the reset button on the board and within 2 seconds (the device stays active for 2 seconds for XTAL32 to settle) hit the connect on Smart Snippets, that will download the flash_programmer before the device goes to sleep.

Apart from that if the JTAG isn't able to communicate with the 580, check if the 580 is powered propely, check if the J5 jumper is properly placed.

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello sir ,

Hello sir ,

I have done the above steps and i have solve the problem that has occurred by changing the setting to extended sleep mode in the user_config.h file thank you in advance !

1) I have updated the SDK version to SDK 5.0.4 by downloading and choosing the sdk folder in Smart Snippets startup menu also installed the recommended J-link driver, but when i set the value to extended sleep mode in the user_config.h file in keil i have the same problem after the first flashing my board isn't recognized at all and i need to do the guide in your previous post to flash again. Also i have data loss the data isn't transmitted correctly . Now I have set it up to ARCH_SLEEP_OFF in the user_config.h file with this configuration i haven't any problem of flashing my board neither data loss everything is transmitted ok. Is anything else that i need to do further ? like in keil for example to set up the sdk somehow or update it to the 5.0.4 ?
I have also set up this values #define CFG_UART_HW_FLOW_CTRL and #undef CFG_UART_HW_FLOW_CTRL in the user_periph_setup.h file

2) Can you give me more information about how to use the FTDI is somehow to change the code in keil to enable the dsps data transfer or we need simply to connected to our ATMEL ? For instance on the tx and rx pins we can't see any data when we send it through the android app you have right the pins that i'm indicating in the schematic is actually the TX and RX pins and not the PO_5 and po_4 but in our terminal or when we use the debug wire mode in ATMEL STUDIO nothing has arrived in the other side.

Thanks in advance your help is much appreciated !
Marios

MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

1) I am sorry but i am quite confused, the SDK is the software enviroment that the 580 uses, if you are using the DSPS reference design, that is build with an older SDK and that means that whatever change you apply to the Smart Snippets studio is not going to change the fact that the SDK is an older SDK and disables the JTAG when operating in sleep mode thus if you would like to burn you flash you will have to always press the reset button. Regarding the data loss, the DSPS is a tested reference design and data loss is not observed if the device is properly set up, if your are facing those kind of problems try checking the device with a PC, if everything turns out ok, that means that something is wrong with the other side of the set up (the external MCU) and its most probably the HW flow control pins (the 580 in sleep mode needs those pins in order to signal the etxernal MCU when it is ready to receive data).

2) Regarding enabling transfer, i dont really get the question, the DSPS when connected whatever is placed on the UART its been transmited to the connected device, you just need to connect all four UART wires RX/TX/RTS/CTS and off course you will have to properly configure your external MCU.

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello Sir,

Hello Sir,

Can you provide me the link of downloading the dsps keil project with the sdk 5.0.4 because i can't compile the DSPS project with the latest sdk version i;m receiving strange errors
i have downloaded the source code of the dsps project from:https://support.dialog-semiconductor.com/connectivity/product/da14580?qt...
Also i have download the latest sdk from:https://support.dialog-semiconductor.com/connectivity/product/da14580?qt...
i suppose i have to update the keil sdk but how to achieve that ? any steps or link of the correct project pack is very helpful
I want to thank you for your quick replies.

Thanks in advance,
Marios

MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

As mentioned the current version of DSPS is builded on a previous SDK version and there is no version available on the latest SDK, in order to do that you need to port the existing version of the DSPS to the new SDK which is something that takes time. I think that you have misunderstood the meaning of the SDK, its not something that you can place in keil and build a project using a new SDK, you have to entirely port the code from one SDK to another. Also if your concern is the fact that you cannot flash the device without hitting the reset first on the current DSPS version you can search for this instruction SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 0); and turn it to 1 in order to have the debugger always enabled.

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Thanks for your quick reply,

Thanks for your quick reply,

1)有必要spi大头针连接到我们的美国银行rd which has the external processor When we are finally have placed the da14580 module it self ?

2) I have searched in the code to enable the bedbug mode and I see that was already set to 1

3)我们要连接在未来即将到来ys the UART tx and Rx pins on our external processor with also CTS RTS pins connected and use the android DSPS app to transmit data we hope the have some success and receive the data

Any further correction on the above steps is much appreciated.
We also find this guide as reference

https://support.dialog-semiconductor.com/resource/b-001-da14580-booting-...

Thanks in advance,
Marios

MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

1) No (if i understand the question correctly), if there is no use of the spi flash memory (for booting or data), there is no need to connect the spi pins.

2) In the check_sys_startup_period() function and in the BLE_SLP_Handler() (there should be two of those functions) the debugger in the DSPS reference design gets disabled SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, 0); so you will have to switch it to 1.

3) The attachment that you have is how the 580 boots, which has nothing to do with the DSPS project. So what are you trying to do ? Download fw from the external MCU or just communicate with external MCU via the DSPS reference design ? either way i dont see any extra connection or additional code modification in the DSPS, the example works out for the box as is, and it should be as long as you have to proper connections.

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Thanks you for your quick

Thanks you for your quick reply!

We have connect the tx Rx and CTS RTS pins but we haven't receive any data from the other side

What we can do to succeed ?
Our code seems ok is anything else that we can try ?

I can't figure out if the spi pins is nesaserry because if i use only the UART pins the buletooth doesn't broadcast at all

Any suggestions much appreciated

Thanks in advance
Marios

MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

Regarding the SPI pins, as mentioned the SPI connection on the DSPS can be used only if there is no fw in the 580, so when you power up the device apparently there is no fw running in the device (as long as you are in development mode and you dont use the OTP), so you will need the SPI connections in order for the 580 to download the image from the external flash. So apparently you dont download the image via keil and while the external processor is running but you are booting up the device and you download the fw from the SPI. The DSPS is using some of the SPI lines that the 580 uses in order to boot as UART lines, so i suppose that you have connected those lines to the SPI and to the UART TX/RX of the FTDI.

What you can try in order to debug the issue is:

  • Deactivate the sleep mode in the project and use software flow control in order for the additional RTS/CTS lines to be ommited. Check if you can get some data with that configuration.
  • Try to re-arrange the conflicting pins or the SPI and the UART, place other port/pins for the UART communication and avoid the pins that are used by the 580 in order to boot from SPI.

As mentioned the reference design works out of the box, so if the implementation of the other side is proper and there is no line issue (connections etc) you should be able to achieve communication.

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello My dialog thanks in

Hello My dialog thanks in advance for your quick response!

We have tried the above settings we have deactivate the sleep mode and the spi pins are configured in deferent port than the UART ports
We have test our program that is on our atmel processor and works properly
But when we are connect the UART pins nothing is transferred on the other side .

And also tried both HW and SW control
Please what can we do to solve the problem

We are going to invest on your product
Dialog 14580
Thanks in advance
Marios

MT_dialog
Offline
Last seen:4 months 3 days ago
Staff
加入:2015-06-08 11:34
Hi marios,

Hi marios,

Let me be more clear on some things because i think that you are missing something:

  • 在黑板上只有essentia SPI的连接l in order for the 580 to download the code from the SPI flash, so when the device boots up, the primary bootloader starts and goes through a procedure where its starts scanning the pins of port0 with different interfaces (I2C/SPI/UART). Those pins (where the device boots from) cannot be changed, the 580 boots from specific pins from specific interfaces (please check the AN-B-001). Thats for the "spi pins are configured in different ports" comment, just to be clear on that.
  • If you are able to see the 580 advertising the DSPS project then until that point you should be ok. Since you are OK until that point connect with the android device and start sending data to your device. If the ATMEL doesn't receive any data please check the lines with a logic analyser in order to see if there are data on the RX/TX lines and if you are using RTS/CTS check also the status of those lines as well.
  • Also in order to keep things more simple try to download code via the JTAG and not via SPI.
  • If you see data on your ATMEL but not the expected ones (junk data) try to lower the baud rate of the devices.
  • Try to use the DSPS and the basic kit with an FTDI on a PC and check if you can get data on the other side (please check the UM-B-038 da14580 Serial Port Service reference application.pdf in order to properly connect the basic kit with a PC).

Thanks MT_dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Dear sir madam hello !

Dear sir madam hello !
We have achived to recieve data from the other side without data loss !

But when we have tried to flash the da 14580 with smart snipets on our board using the dev kit such as a programmer we are reciving this error on smart snipets. (The atached image)

We have used the recommended flash memory from dialogue.
Can you provide a proper way to flas the da14580 on our board .

Thanks in advance,
Marios

KevinL
Offline
Last seen:2 months 1 week ago
Staff
加入:2017-11-06 13:52
Hi Marios,

Hi Marios,

Which interface you used to download the frimware, UART or JTAG?

BTW, I found P1_3 is used as BT_TX, is this uart interface? We don't suggest customer use P1_2 and P1_3 if the GPIOs are enough.
Please find Dialog anpplication note AN-B-018 chapter 3.2.

Best Regards

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello !

Hello !
Thanks for your quick reply !

Our conections from the DA14580DEVKIT-B BASIC to our custom board are:

SPI_MISO = P0_5
SPI_MOSI = P06
PO_3 = SPI_CS
P0_0 = SPI_CL
T_TMS = SWDIO
T_TCK = SW_CLK

We use jtag interface we have sucessful conected the board with jtag but we are receving the folowing error log when we have tried to flash and werify the spi memory throught the smart snipets:

[INFO SPI Flash Programmer @18-07-31 20:56:19] Found SWD-DP with ID 0x0BB11477
[INFO SPI Flash Programmer @18-07-31 20:56:20] FPUnit: 4 code (BP) slots and 0 literal slots
[INFO SPI Flash Programmer @18-07-31 20:56:20] Found Cortex-M0 r0p0, Little endian.
[INFO SPI Flash Programmer @18-07-31 20:56:20] Firmware File C:\DiaSemi\SmartSnippetsStudio\Toolbox\common_resources\jtag_programmer.bin has been selected for downloading.
[INFO SPI Flash Programmer @18-07-31 20:56:20] Successfully downloaded firmware file to the board.
[INFO SPI Flash Programmer @18-07-31 20:56:20] Successfully configured SPI Flash ports and pins.
[INFO SPI Flash Programmer @18-07-31 20:56:24] Started reading 32768 bytes from memory.
(信息SPI Flash程序员@18-07-31 20:56:26]意图ding has finished. Read 32768 bytes.
[INFO SPI Flash Programmer @18-07-31 20:56:33] SPI Memory erasing completed successfully.
[INFO SPI Flash Programmer @18-07-31 20:56:33] Reading memory to verify its contents after erase...
[ERROR SPI Flash Programmer @18-07-31 20:56:33] Verification failed at address 0x00
[INFO SPI Flash Programmer @18-07-31 20:56:33] Reading memory to refresh its contents....
[INFO SPI Flash Programmer @18-07-31 20:56:35] Reading has finished. Read 32768 bytes.
[INFO SPI Flash Programmer @18-07-31 20:56:41] SPI Memory erasing completed successfully.
[INFO SPI Flash Programmer @18-07-31 20:56:41] Reading memory to verify its contents after erase...
[ERROR SPI Flash Programmer @18-07-31 20:56:41] Verification failed at address 0x00
[INFO SPI Flash Programmer @18-07-31 20:56:41] Reading memory to refresh memory contents....
[INFO SPI Flash Programmer @18-07-31 20:56:41] Reading has finished. Read 32768 bytes.
[INFO SPI Flash Programmer @18-07-31 20:56:51] Started burning memory with 17992 bytes of data at address 0x00000.
[INFO SPI Flash Programmer @18-07-31 20:56:53] Memory burning completed successfully.
[INFO SPI Flash Programmer @18-07-31 20:56:53] Reading memory to refresh memory contents....
[INFO SPI Flash Programmer @18-07-31 20:56:55] Reading has finished. Read 32768 bytes.
[INFO SPI Flash Programmer @18-07-31 20:57:07] Started reading 32768 bytes from memory.
[INFO SPI Flash Programmer @18-07-31 20:57:09] Reading has finished. Read 32768 bytes.

Thanks in advance,
Marios

MHv_Dialog
Offline
Last seen:3 months 3 weeks ago
Staff
加入:2013-12-06 15:10
Hi Marios,

Hi Marios,

Let me see if I can help.

The schematic you posted above is correct except for the fact that you are using the wrong set of pins for the UART (as already pointed out above). Unless you change the pin configuration in the DSPS implementation you will need to use P0_4 as TX output from the DA14580 and P0_5 as RX input to the DA14580. Those signals are available on the development kit pin header (J4 on the BASIC kit and J5 on the PRO kit). Notice that P0_5 is already connected to MISO of the FLASH, but this should not cause any issues as long as you keep the slave select (/SS or /CE or /EN) on the flash high - this will force the MISO to go high-Z. I would recommend changing the pin-out in the DSPS implementation just to avoid any issues, but it ought to work as-is.

There is a chance that your flash is not working, but please follow these instructions before we go ahead and set up a product replacement. Our development kits are very well built and I have not experienced many product returns in the 5 years I have been in this seat :o)

  1. Disconnect your external processor board entirely just use the development kit with the jumpers set as in your schematic above (for SPI operation)
  2. Close SmartSnippets toolbox - the tool is great, but does not automatically recover when unforseen issues occur
  3. Reopen SmartSnippets tool box. Select the JTAG option and make sure to slect the right Dialog chip. Click 'Open'
  4. Open the FLASH utility and select your hex file
  5. Your screenshot shows the flash size set to 200,000, change this to 20,000 (it is a hexadecimal number!)
  6. Select 'Connect', then 'Erase', then 'Burn and Verify'. Respond 'Yes' when asked if you want the image to be bootable

And finally, send me the log for review.

/MHv

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello we have disconnect the

Hello we have disconnect the external board from the DEV KIT and we have set the jumpers for spi connection
the program of the spi was succsessfull and the broad broadcast.

The log from smartsnipets:

[INFO @18-08-01 16:12:03] Firmware File C:\Users\aimon\SmartSnippets\resources\jtag_programmer.bin has been selected for downloading.
[INFO @18-08-01 16:12:04] Successfully downloaded firmware file to the board.
[INFO @18-08-01 16:12:04] Successfully configured SPI Flash ports and pins.
[INFO @18-08-01 16:12:08] Header records have been removed from hex file sps_device_580.hex.
[INFO @18-08-01 16:12:08] Read 17672 bytes from file sps_device_580.hex.
[INFO @18-08-01 16:12:16] SPI Memory erasing completed successfully.
[INFO @18-08-01 16:12:16] Reading memory to verify its contents after erase...
[INFO @18-08-01 16:12:18] Verification succeeded.
[INFO @18-08-01 16:12:18] Reading memory to refresh its contents....
[INFO @18-08-01 16:12:19] Reading has finished. Read 32768 bytes.
[INFO @18-08-01 16:12:43] Started burning memory with 17992 bytes of data at address 0x00000.
[INFO @18-08-01 16:12:43] Memory burning completed successfully.
[INFO @18-08-01 16:12:43] Reading memory to verify SPI FLash memory contents after burn...
[INFO @18-08-01 16:12:44] SPI FLash memory verification succeeded.

Next we have conect again our custom bord to the dev kit with the spi conections
and we have the folowing log
to conect successfully and read the memeory we have to press the reset buton all the time otherwise we recive the errors as sown at the first lines of the log

LOG of smartsnipets

[INFO @18-08-01 16:36:34] Firmware File C:\Users\aimon\SmartSnippets\resources\jtag_programmer.bin has been selected for downloading.
[ERROR @18-08-01 16:36:34] Failed writing file C:\Users\aimon\SmartSnippets\resources\jtag_programmer.bin at address 80000.
[INFO @18-08-01 16:36:34] Failed downloading firmware file to the board.
[INFO @18-08-01 16:36:34] Failed configuring SPI Flash ports and pins.
[INFO @18-08-01 16:37:06] Firmware File C:\Users\aimon\SmartSnippets\resources\jtag_programmer.bin has been selected for downloading.
[WARNING @18-08-01 16:37:07] T-bit of XPSR is 0 but should be 1. Changed to 1.
[INFO @18-08-01 16:37:07] Successfully downloaded firmware file to the board.
[INFO @18-08-01 16:37:07] Successfully configured SPI Flash ports and pins.
[INFO @18-08-01 16:37:21] Started reading 32768 bytes from memory.
[INFO @18-08-01 16:37:22] Reading has finished. Read 32768 bytes.
[INFO @18-08-01 16:37:55] Header records have been removed from hex file sps_device_580.hex.
[INFO @18-08-01 16:37:55] Read 17672 bytes from file sps_device_580.hex.
[INFO @18-08-01 16:38:09] Image size after adding bootable header is: 17992
[INFO @18-08-01 16:38:09] Started burning memory with 17992 bytes of data at address 0x00000.
[ERROR @18-08-01 16:38:09] Failed writing bytes at address 20000000.
[ERROR @18-08-01 16:38:09] Memory burning failed.

Thanks in advance,
Marios

MHv_Dialog
Offline
Last seen:3 months 3 weeks ago
Staff
加入:2013-12-06 15:10
Hi MArios,

Hi MArios,

You have already programmed a firmware image into the flash, which means that the ROM bootloader will find and execute that image as soon as the device powers up. Resetting the device only gives you a very brief window to 'catch' the device with the JTAG. You can get around this if you remove one of the jumpers connecting to the flash (pin 23-24 of the development kit J4/J5 will cut the power from the flash), reset the target, press 'Connect' and then place the jumper again. At this point the flash loader image will have loaded and you can again erase and program the flash. It appears from the log that you forgot to erase the flash before you attempted to program it.

/MHv

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello ! MHv_Dialog!

Hello ! MHv_Dialog!

This is the log from smart snipets

Evrething is right conect read but when i hit erase i have the folowing log from smartsnipets

[INFO SPI Flash @18-08-01 20:34:24] Found SWD-DP with ID 0x0BB11477
[INFO SPI Flash @18-08-01 20:34:24] FPUnit: 4 code (BP) slots and 0 literal slots
[INFO SPI Flash @18-08-01 20:34:24] Found Cortex-M0 r0p0, Little endian.
[INFO SPI Flash @18-08-01 20:34:24] Firmware File C:\DiaSemi\SmartSnippetsStudio\Toolbox\common_resources\jtag_programmer.bin has been selected for downloading.
[INFO SPI Flash @18-08-01 20:34:24] Successfully downloaded firmware file to the board.
[INFO SPI Flash @18-08-01 20:34:25] Successfully configured SPI Flash ports and pins.
[INFO SPI Flash @18-08-01 20:34:28] Started reading 32768 bytes from memory.
[INFO SPI Flash @18-08-01 20:34:29] Reading has finished. Read 32768 bytes.
[INFO SPI Flash @18-08-01 20:34:38] SPI Memory erasing completed successfully.
[INFO SPI Flash @18-08-01 20:34:38] Reading memory to verify its contents after erase...
[ERROR SPI Flash @18-08-01 20:34:38] Verification failed at address 0x00
[INFO SPI Flash @18-08-01 20:34:38] Reading memory to refresh its contents....
[INFO SPI Flash @18-08-01 20:34:39] Reading has finished. Read 32768 bytes.

In advance
marios

MHv_Dialog
Offline
Last seen:3 months 3 weeks ago
Staff
加入:2013-12-06 15:10
Hi Marios,

Hi Marios,

This is good data. We can now conclude that your external processor is interfering with the flash read operation. This is likely caused by the mixed use of the P0_5 pin (TX from your processor and MISO between the flash and the DA1458x). The output driver of the external processor UART is too strong for the MISO of the flash to toggle freely. You can probably confirm this with an oscilloscope.

解决t的首选方法his is to open the DSPS project and change the UART RX pin from P0_5 to some other pin of your choice. Alternatively, You could try to put a series resistor between TX of your external processor (say 1kOhm) and the P0_5 header pin. This is not a great solution as it puts a load on the signal and increases the power consumption, but may be a fast way to move forward.

/MHv

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello MHv_Dialog!!

Hello MHv_Dialog!!
Thanks for your quick reply!!!

As you can see from the atached conection diagram
The uart pin p0_5 RX is chanced to pin p1_3 to avoid conflict with spi.

This error is has to do with the uart conection ?

In advance,
Marios

MHv_Dialog
Offline
Last seen:3 months 3 weeks ago
Staff
加入:2013-12-06 15:10
Hi Marios,

Hi Marios,

I am confused. The schematic you just provided what is that? What is the prurpose of J7?

My understanding so far has been that you are using a DA14580 BASIC development kit in the following way:

  1. DSPS firmware is loaded in the external flash on the development kit (and the jumpers are setting accordingly). You are able to successfully load the firmware into the flash at this point.
  2. You have a custom board with some other microcontroller and you want this controller to interface with the DA145850 via UART. You are NOT connecting the flash on the development kit to your custom controller board; only the UART.
  3. The DSPS firmware you are using was built with HW flowcontrol disabled and the RX of the UART was defined as port P1_3

Your schematic2018-08-01_22.38.26.pdfdoes not match that understanding, so I need you to break down exactly what you are trying to achieve.

/MHv

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello !!!

Hello !!!

1)We have trasmited data from the dsps android app to our custom microcontroler. Using devkit spi flash and conecting the uart pins to our microcontroler.
And data transmited succssessfull.

Now we have disighed our board that has our atmel processor and dialog da14580 together and the flash memory spi from booting the dsps.

We want to somehow to flash the spi memory .

How this can achived to flash the spi that is on our custom board ?

Is it possible to be done with the dev kit ?
Or something else like programmer ?

Thanks in advance
Marios

MHv_Dialog
Offline
Last seen:3 months 3 weeks ago
Staff
加入:2013-12-06 15:10
Hi Marios,

Hi Marios,

Thanks for the explanation. I think it is clear what you are trying to do now ;o)

It is certainly possible to use the DA14580 BASIC kit and SmartSnippets to program your custom board. Please see the bring-up guide (https://support.dialog-semiconductor.com/system/files/resources/Training_07_DA1458x_prototype_bring_up_guide-v1.2.pdf, page 23) for details - only four connections are required, GND, SW_CLK, SW_DIO and optionally RST.

/MHv

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello !! MHv_Dialog !

Hello !! MHv_Dialog !
Thank you for your quick reply !!

Wery helpfull !
Thanks i wil try it very soon i will keep you in touch !

Now i have understand that miso-mosi and other pins
Dosen't have to be conected during programing process but has to be conected with the spi flash for the booting process when the flash complets,

And only the four pins that you have said above during flashing process.

In advance,
Marios

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello ! MHv_Dialog !

Hello ! MHv_Dialog !

Today we have tested the recomended conections and we have suceeded !
our spi memory has erased and verified sucssesfully and we have bured the memory !
but we have recive one verification error
在智能nipets日志播种n in the atached pdf file

the board broadcast the name and we conected sucseesfully as expected !
we haven't test the trasmision data yet but seems good and working.

but why we have this veryfication error after flashing the memory ?
Thenks in advance,
Marios

MHv_Dialog
Offline
Last seen:3 months 3 weeks ago
Staff
加入:2013-12-06 15:10
Hi Marios,

Hi Marios,

That is really good news.

The verification error could be caused by your JTAG wires being too long. You should limit the length to no more than 2-3 inches to ensure proper transmissions.

/MHv

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello MHv_Dialog!

Hello MHv_Dialog!

Superb ! thanks for your quick reply !
we have limit the lenght of the JTAG wires and now we have suceeded !! veryfy sucssessfully burning the flash memory!

in the DSPS code in KEIL how we can enable the deep sleep mode of the da14580 ?

Thanks in advance,
Marios

PM_Dialog
Offline
Last seen:2 days 23 hours ago
Staff
加入:2018-02-08 11:03
Hi marios,

Hi marios,

Glad that you are able to burn the SPI flash via JTAG. The DSPS reference design does not support deep sleep mode. Please the DSPS user manual (UM-B-038) and you will find that only extended sleep mode is supported. In case you want to change the sleep mode, you should configure theapp_default_sleep_modevalue with the proper define into theuser_config.hheader file. Please, check the code snippets below:

  • Extended sleep mode configuration

const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;

  • Active mode configuration

const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;

Thanks, PM_Dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

Thanks for your quick reply!

i have seen that at the user_config file on the sdk dsps project has the function for enabling the deep sleep mode on the dsps project and also at config_basic file as you can see on the atached pdf files.
if i choose the ARCH_DEEP_SLEEP_ON at user_config file and define the CFG_MEM_MAP_DEEP_SLEEP option at config_basic file does that setings enables the deep sleep on the dsps project ?
thanks alot for your help and your time !

In advance,
Marios

附件:
PM_Dialog
Offline
Last seen:2 days 23 hours ago
Staff
加入:2018-02-08 11:03
Hi marios,

Hi marios,

As I have already mentioned in my previous post, the deep sleep mode is not supported in the DSPS application code, so the CFG_MEM_MAP_DEEP_SLEEP macro does not enable the deep sleep.

Thanks, PM_Dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello PM_Dialog !

Hello PM_Dialog !

Thanks for your quick reply !

In the extended deep sleep mode on the DSPS project
How much is the power consumption when the device is at the sleep state and how at the conected mode ?

Thanks very much for your time and precius help !

In advance ,
Marios

PM_Dialog
Offline
Last seen:2 days 23 hours ago
Staff
加入:2018-02-08 11:03
Hi marios,

Hi marios,

The current consumption in active mode is around 0.6mA and in extended sleep mode around 1.4uA.

Thanks, PM_Dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello PM_Dialog !

Hello PM_Dialog !

This is aswome news !! Superb! Thanks for your quick response !

1)我们希望也spi闪光过程中change the bluetooth name for each device is that possible some how ?

2) The bluetooth adress UUID has to be unique ? or we can use the default UUID for all the produced devices with difrent brodcast names ?

Thanks in advance,
Marios

PM_Dialog
Offline
Last seen:2 days 23 hours ago
Staff
加入:2018-02-08 11:03
Hi marios,

Hi marios,

  1. In order to change the device name, please configure the USER_DEVICE_NAME definition in the user_config.h header file.
  2. Every device should have its own BD address. You can have either a public or a static BD address, but each address should follow the proper format in both of the cases.

If you have any other questions, please create a new post on the forum, because this thread is not relative with your last questions. If you are not aware of how you are able to create a new post, please let me know and I will provide you the proper steps

Thanks, PM_Dialog

marios
Offline
Last seen:4 months 4 weeks ago
加入:2017-05-09 20:27
Hello PM_Dialog!

Hello PM_Dialog!

yes if you can guide me to open a new thread on the forum is much appreciated !

I have been in the help and feedback section is that correct ?

Thanks in advance ,
Marios

PM_Dialog
Offline
Last seen:2 days 23 hours ago
Staff
加入:2018-02-08 11:03
Hi marios,

Hi marios,

  1. Visit our forum page in this link:https://support.dialog-semiconductor.com/forum
  2. Please log in, expand the “Bluetooth” tab you will see Dialog Smartbond Bluetooth Low Energy (H/W, S/W, Tools) forums.
  3. Then, enter the Dialog “Smartbond Bluetooth Low Energy – Software” forum.
  4. Hit to the “New Topic” and finally create your post with the appropriate keywords.

According to the steps I described, you should not been in the help and feedback section. You will find attached some screenshots of the above steps.

Thanks, PM_Dialog