SPI引导和pin重新映射/DA14580和DA14585兼容性

⚠️
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.
18 posts / 0 new
Last post
BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
SPI引导和pin重新映射/DA14580和DA14585兼容性

Dear Dialog support team,
I'm using DA14580 with SPI,and my .HEX is around 40KB, so I have to use external flash.
But the program doesn't work in this case, if I test a program doesn't use SPI, it works.
So I have the following questions:
1) Is it possible for me to use SPI external flash and also use SPI after booting?
2) If I can use SPI after booting, how to remap the pins?
3) If I use DA14585 which has enough OTP space,can I remap the pins randomly/or any rules to remap pins ?
4) Now I'm using DA14580, is DA14585 compatible with DA14580 in terms of soft ware and hard ware?

Thanks a lot for your help.
Benjamin

Device:
PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

The DA14580 boots from standard pins. Please check the “Table 1: Pin assignment and booting sequence from external devices” from the AN-B-001 document. You can download this document from our support portal. For your convenience, you can follow the link below as well.

https://support.dialog-semiconductor.com/resource/b-001-da14580581583-booting-serial-interfaces

After the booting procedure you are allowed to use the external flash for your application code. Could you please clarify what do you mean with the “remap”? Do you want to boot from different pins from the standers pins or do you mean that you want to change SPI flash pins after the booting procedure?

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
I mean after booting, my

I mean after booting, my application wants to use spi for other purpose( not to r/w flash), for example, to display lcd using spi. if I use jlink, it works, but if I use flash , it doesn't.

can you also help me with above questions about da14585?

THANKS

PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

Sorry, but I didn’t completely understand what you mean that if you use JLink it is working but if you use flash it is not working. I need some clarifications on this and please try to understand what you are trying to accomplish. If I understand correctly, you would like to burn the SPI flash with your firmware, booting from there and then after booting you would like to remap the same SPI GPIOs which are connected to the Flash for the other usage? If I don’t understand correctly, please let me know and correct me.

According to the datasheets, the DA14580 has 32KB OTP and the DA14585 has 64KB OTP. Please refer to the appropriate datasheets for any addition information. I am not able to understand what you mean exactly with the “can I remap the pins randomly/or any rules to remap pins”. The DA14580 and DA14585 have different hardware and each of them run different SDK. The latest version of SDK for DA14580/1/2/3 is the version 5.0.4, and the latest version of DA14585/6 SDK is version 6.0.10.

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
Dear Dialog support team,

Dear Dialog support team,

Thanks for your quick response and yes to some extent you are correct in understanding my question, and I will express my question more clearly.

Yes I want to burn the SPI flash with my firmware, booting from there.
After booting, I need to use SPI(other GPIOs,for CS) to control other components(for example LCD).

When I use JLink(run directly from Keil, firmware not burned onto flash.), the LCD controlled by SPI works well.
But if I burn the firmware onto flash and boot from there, the LCD controlled by SPI does not work.( I also tested other program without using SPI,burn onto flash, booting from flash the program works)

Hope I express my question clearly and hope you can give me the reason.

Thanks a lot.
Benjamin

PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

Could you please probe the SPI signals when booting from SPI Flash and the LCD does not work and then let me know with the results? You mentioned that after booting you would like to use different GPIOs to control the other components. Did you configure them?

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
Dear DIalog,

Dear DIalog,

I'm sorry I can't probe the signal.

Attached is the configure of the GPIOs, with the configuration, it works well while debuging, if burned into flash, it stops work.
Can you help to have a look of my configuration?

I have an analysis,
As my firmware is more than 42KB, after booting, system still needs to communicate with flash, this may result in confict with flash SPI and my SPI.

Thanks a lot

Benjamin

Attachment:
PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

It would be great and very helpful if you would able to probe the SPI signals, because we could extract further information about your issue. By the way, no problem that you are not able to probe your signals. Your configurations seem correct. If I am able to understand correctly from what you mentioned, if your firmware is less than 42KB, your application works correctly?

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
Dear Dialog,

Dear Dialog,

I will manage to probe the signal and come back later.

I have a firmware less than 42KB and it works well in flash, but the firmware has no SPI.
I wonder how it works if the System SRAM is only 42KB, while the firmware is more than that?

Thanks a lot for your quick answer.

Benjamin

PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

Could you please clarify what you mean that your firmware has no SPI? So, if you download firmware into the external SPI flash and boot from there, does this work correctly? Also, could you please make sure that your firmware is more than 42KB? If yes, it is quite strange that it works correctly when you store it into the SysRAM.

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
Dear Dialog,

Dear Dialog,
Has no SPI meas the application does not use SPI, but it has SPI connected to flash, let's forget it as I have new founding, please see the following.
我用SPI测试了另一个示例(SPI连接到flash,也连接到其他组件),这个示例的固件是37KB,从flash引导时可以工作。

So if the firmware is more than 42KB, DA14580 can not work?
And if the firmware is more than 42KB, what shall I do? any method to use DA14580? or I have to choose other chip like DA14585?

Thanks a lot

Benjamin

PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

因为你是使用DA14580,如果固件ize is more than 42KB, you want be able to store into the SystemRAM. Please check the DA14580 datasheet and you will find that the System RAM is 42KB. Since you have an external SPI Flash, you could store your firmware there and boot from the SPI Flash. In order to burn the SPI Flash, you should use the Smart Snippets toolbox and you can download it from our support portal. In case you would like to download firmware only into the SystemRAM, you could move inti DA14585. According to the DA14585 datasheet, there is 96 kB Data/Retention SystemRAM. If you have not download it the Smart Snippets toolbox, you could find it from the “Software & Tools” tab of the DA14580 support page. Also. I would highly recommend you to have a look at theUM-B-083 SmartSnippets Toolbox User Manualin order to check how you could burn the SPI Flash using the toolbox.

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
Dear Dialog,

Dear Dialog,

In the previous I said I can boot from flash,I already know how to burn firmware into flash.

I have another question,if I burn the firmware into flash, can the program run directly without being loaded in SystemRAM? (sorry I know little about chip, I think a booting is loading the firmware into SystemRAM and run there).
The reason I asked the question is that if I burn a firmware more than 42KB,the program with SPI doesn't work, if I burn a firmware less than 42KB, then the program with SPI works.

Thanks

Benjamin

PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

我强烈推荐你去看一看AN-B-001 document in order to understand how the DA14580 boots. I have already provided you the link in order to download it. Please check Figure 2: DA14581 booting sequence, and you will see that after the booting sequence from external devices, the code is downloaded to SysRAM. The reason why your program is not working is why you are not able to download firmware to SysRAM which is more than 42KB.

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
Dear Dialog,

Dear Dialog,

I've read AN-B-001,I can not find direct info about how big firmware can run on DA14580.
I'm confused as the following 2 from your previous answer.
1)Since you are using the DA14580, if the firmware size is more than 42KB, you want be able to store into the SystemRAM. Please check the DA14580 datasheet and you will find that the System RAM is 42KB. Since you have an external SPI Flash, you could store your firmware there and boot from the SPI Flash.
2)The reason why your program is not working is why you are not able to download firmware to SysRAM which is more than 42KB.

To avoid confusion, can you simply answer me YES or NO for the following question?
Is there any way to run the program on DA14580 if the firmware is more 42KB?

PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

很抱歉,我会尽量说得更具体些。你不能写超过42K系统内存的软件。此外,您不允许使用系统内存的所有42K,因为部分RAM由堆栈、交换内存等使用。您不能将超过42K的固件存储到SPI闪存中。请检查图1:AN-B-001的DA14580引导序列。根据该图,您将看到从SPI Flash引导后,代码被下载到SysRAM中,因此如果您的代码超过42K,它将无法放入RAM中。综上所述,由于您使用的是DA14580,因此不允许运行超过42K的固件。如果您希望使用更大的固件,则应使用DA14585产品。

Thanks, PM_Dialog

BenjaminDu
Offline
Last seen:3 weeks 3 days ago
Joined:2016-03-14 02:38
Dear Dialog,

Dear Dialog,

Thanks and now it is clear.

Benjamin

PM_Dialog
Offline
Last seen:1 day 16 hours ago
Staff
Joined:2018-02-08 11:03
Hi BenjaminDu,

Hi BenjaminDu,

Glad that the things get cleared. If you found any of the above answers useful, please mark on of them as accepted.

Thanks, PM_Dialog