SPI booting & pin remapping / DA14580 & DA14585 compatibility

⚠️
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.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
18个职位/0个新职位
Last post
本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
SPI booting & pin remapping / DA14580 & DA14585 compatibility

Dear Dialog support team,
我使用带SPI的DA14580,我的.HEX大约是40KB,所以我必须使用外部闪存。
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) 我是否可以使用SPI外部闪存,也可以在引导后使用SPI?
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) 现在我用的是DA14580,DA14585和DA14580在软硬件方面兼容吗?

谢谢for your help.
本杰明

设备:
PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨BenjaminDu,

DA14580靴子采用标准别针。请检查AN-B-001文件中的“表1:外部设备的引脚分配和引导顺序”。您可以从我们的支持门户下载此文档。为方便起见,您也可以点击下面的链接。

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

启动程序完成后,您可以使用外部闪存来编写应用程序代码。你能澄清一下“重新映射”是什么意思吗?您是想从不同的引脚从标准引脚引导,还是您的意思是,您想改变SPI闪存引脚后引导程序?

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week 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.

关于da14585,你能帮我解答以上问题吗?

谢谢

PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨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.

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
Dear Dialog support team,

Dear Dialog support team,

谢谢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.
在引导之后,我需要使用SPI(其他gpio,对于CS)来控制其他组件(例如LCD)。

当我使用JLink(直接从Keil运行,固件没有烧到flash上)时,由SPI控制的LCD工作得很好。
但是如果我把固件烧到flash上并从那里引导,由SPI控制的LCD就不工作了(我还测试了其他没有使用SPI的程序,烧到flash上,从flash引导程序工作)

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

谢谢.
本杰明

PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨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?

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
亲爱的DIalog,

亲爱的DIalog,

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

附件是GPIOs的配置,有了这个配置,在调试的时候可以很好的工作,如果烧成flash,就会停止工作。
你能帮我看看我的配置吗?

我有个分析,
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.

谢谢

本杰明

Attachment:
PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨BenjaminDu,

如果您能够探测到SPI信号,这将是非常有用的,因为我们可以提取有关您问题的更多信息。顺便说一下,没问题,你不能探测你的信号。您的配置似乎正确。如果我能正确理解你所说的,如果你的固件小于42KB,你的应用程序工作正常吗?

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
亲爱的Dialog,

亲爱的Dialog,

我将设法探测信号,稍后再回来。

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?

谢谢for your quick answer.

本杰明

PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨BenjaminDu,

你能澄清一下你的固件没有SPI是什么意思吗?那么,如果您将固件下载到外部SPI闪存并从那里引导,这是否正常工作?另外,请确保您的固件超过42KB,好吗?如果是的话,当您将它存储到系统内存中时,它是否正常工作就很奇怪了。

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
亲爱的Dialog,

亲爱的Dialog,
没有SPI意味着应用程序不使用SPI,但它有SPI连接到闪存,让我们忘记它,因为我有新的创始,请看下面。
我测试的另一个示例SPI (SPI connected to flash and also connected to other components),the firmware is 37KB for this sample , and it works when boot from flash.

那么如果固件超过42KB,DA14580就不能工作了吗?
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?

谢谢

本杰明

PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨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工具箱用户手册以检查如何使用工具箱烧录SPI闪存。

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
亲爱的Dialog,

亲爱的Dialog,

在前面我说过我可以从flash启动,我已经知道如何将固件烧入flash。

我还有一个问题,如果我把固件烧成flash,程序能直接运行而不加载到SystemRAM吗(抱歉,我对芯片知之甚少,我认为引导是将固件加载到SystemRAM中并在那里运行)。
我问这个问题的原因是,如果我烧的固件超过42KB,带有SPI的程序就不能工作,如果我烧的固件小于42KB,那么带有SPI的程序就可以工作。

谢谢

本杰明

PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨BenjaminDu,

我强烈建议您看一看AN-B-001文档,以了解DA14580是如何启动的。我已经提供给你的链接,以便下载它。请检查图2:DA14581引导序列,您将看到在从外部设备引导序列之后,代码被下载到SysRAM。程序无法运行的原因是无法将固件下载到超过42KB的系统内存。

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
亲爱的Dialog,

亲爱的Dialog,

我读过AN-B-001,我找不到关于DA14580上可以运行多大固件的直接信息。
从你先前的回答中,我感到困惑的是以下两个问题。
1) 由于您使用的是DA14580,如果固件大小超过42KB,您希望能够存储到SystemRAM中。请查看DA14580数据表,您会发现系统RAM为42KB。因为您有一个外部SPI闪存,所以您可以将固件存储在那里并从SPI闪存引导。
2) 程序无法运行的原因是无法将固件下载到超过42KB的系统内存。

为了避免混淆,你能简单地回答我下面的问题是或否吗?
Is there any way to run the program on DA14580 if the firmware is more 42KB?

PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨BenjaminDu,

Sorry for the confusion, I will try to be more specific. You can't write software that exceeds the 42K SYSRAM. Also you are not allowed to use all the 42K of the SYSRAM since parts of the RAM are used by the stack, exchanged memory etc. You cannot store your firmware which is more than 42K into the SPI Flash as well. Please check the Figure 1: DA14580 booting sequence from the AN-B-001. According to the diagram, you will see that after booting from the SPI Flash, the code is downloaded into the SysRAM, so if your code exceeds the 42K it would not be fit into the RAM. To sum up, since you are using the DA14580, you are NOT allowed to run a firmware which exceeds the 42K. In case you would like to have bigger firmware, you should move into DA14585 product.

谢谢, PM_Dialog

本杰明Du
Offline
Last seen:2 months 1 week ago
Joined:2016-03-14 02:38
亲爱的Dialog,

亲爱的Dialog,

谢谢and now it is clear.

本杰明

PM_Dialog
Offline
Last seen:1天9小时前
Staff
Joined:2018-02-08 11:03
嗨BenjaminDu,

嗨BenjaminDu,

很高兴事情解决了。如果您发现以上任何答案有用,请在其中一个答案上注明为已接受。

谢谢, PM_Dialog