从具有集成闪存的外部CPU启动

16 posts / 0 new
最后一篇
Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
从具有集成闪存的外部CPU启动

Hello MT_dialog,

我使用DA14580开发套件基本和AN-B-023我成功将我的项目加载到闪存(W25x20CL)中,并使用SPI从其启动。

现在,我想使用SPI将其连接到STMicroelectronics STM32F103R8,是可以将我的项目加载到它的内部闪存中,并在我使用DA14580时从中启动它吗?或者我应该在ST微控制器中实现一个引导协议,以将数据发送到SPI到我的BLE模块(从机)?

非常感谢你,

-- Saif

Device:
mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

I dont get exactly what is that you want to do. When the 580 boots the primary bootloader expects a specific sequence of bytes on specific ports (SPI master/ SPI slave among other interfaces). Please check the AN-B-001 - Booting from serial interfaces for more information about the booting sequence.

谢谢mt_dialog.

Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
嗨mt_dialoolog,

嗨mt_dialoolog,

Thank you for your answer, In fact, I allready checked the AN-B-001 and my question is :
我将Pan1740模块集成到STMicroelectronics STM32F103R8中,我希望它使用SPI从ST微控制器的闪存引导,因此我应该将我的数据发送到580,如AN-B-001中所述?

Because what I did before, is just using Smartsnippets, I loaded my Hex file into the SPI Flash memory and the 580 could boot, it could not be the same with an integrated flash memory in a ST Microcontroller ? without implementing how data should be sent over SPI...

谢谢,

mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

The AN-B-001 describes the booting procedure in all 580's interfaces, on power on, the 580's bootloader will run and you should provide the proper data over the interface you choose (SPI in your case master/slave configuration) in order to start the booting seqence. There is an example in the SDK between 2 580's one as master and the other as slave over an SPI interface with the #define SPI_BOOTER you can choose your master device to download the .bin to your slave. The example is under host_apps/da1458x/proximity/reporter.

谢谢mt_dialog.

Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
Hi MT_dialog,

Hi MT_dialog,

感谢您的支持,记者榜样是如此乐于助人!
So now to extract the image data from an .hex file , I removed the address, then the CRC and I kept only data, and I replaced gaps by 0x00 , then I put the data into a buffer, is it correct ?

谢谢,

mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

The file to be downloaded is the .bin file not the .hex file, you can convert the .hex to .bin from the hex2bin tool from the utilities folder in the SDK, open th .bin with an editor, copy and paste the data in your .c file, and download.

谢谢mt_dialog.

Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
Hi MT_dialog,

Hi MT_dialog,

谢谢,我在你所说的情况下实现,现在确保我的引脚配置正常,我确实如在AN-B-001:P-0-0 < - > SCK,P0_3 < - > CS,P0_5 <- > MOSI和P0_6 < - >味噌,以及其他引脚,我应该把跳线吗?(TCK,TMS,蝙蝠)
Second point is about timing, I should send data exactly when boot algorithm in 580 is searching for data on SPI, so how long it takes before the 5 times looped and JTAG is enabled ? what is the best way to do that ?

谢谢,

mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

The TCK, TMS are the debuger pins if you would like to download your .bin through keil you have to use those pins if not you can ommit them as well the BATS pin is the pin for the SPI memory on board of the development kit. Please check the schematics for the development kit you own. Also yes, you should send the data while the bootloader is running in order for the downloading to be succesful, it should start immidiatelly, the exact timeouts for the steps of the booting procedure are described in the AN-B-001 document.

谢谢mt_dialog.

Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
Hello MT_dialog,

Hello MT_dialog,

我仍然无法从我的SPI大师微控制器启动,所以请你能为我验证这个:

我开始在580年通过控制复位销智慧h my Microcontroller, waited for 103ms as described in "AN-B-01" , and then strated sending the header (enable CS and send data) as done in the reporter example.. but I have never received the ACK or NACK , sometimes I got data on MISO just when I strating sending the header, please find attached a screenshot of header sending analysis with Saleae.

Have I missed something ?

谢谢,

附件:
mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

在580上使用SPI奴隶有点棘手,请确保主站提供的SPI时钟至少四倍,即奴隶上的内部SPI时钟配置,也请在主设备上进行一些延迟在SPI总线上发送数据时。另请检查您的连接,应尽可能短,屏蔽和正确终止。

谢谢mt_dialog.

Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
Hello MT_dialog,

Hello MT_dialog,

谢谢你的回复,我会检查我的连接,并为时钟,580的内部频率是16MHz,这是对的吗?到目前为止,我发送了主时钟频率= 250kHz的数据,所以它应该是正确的吗?

要在发送数据时延迟延迟,我尝试过,但似乎不是逻辑的状态,它需要这么多时间才能发送图像,它可能是标题而不是图像,所以请确认时钟频率和i将检查我的连接。

谢谢,
--Saif

mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

The internal SPI clock frequency can reach 16MHz the (maximum/minimum divider is 1). Please check the AN-B-001 for the proper settings on the SPI clock when the 580 boots from an SPI master. Since your master is sending data in frequency up to 250KHz you should be ok since 500 is the limit without issuing any delays between the sending bytes. The SPI sampler in the 580 is quite sensetive and the wire cables can cause lot problems since it can mistakenly receive small spikes or reflections as pulses.

谢谢mt_dialog.

Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
Hello MT_dialog,

Hello MT_dialog,

由于SPI不起作用,我试图从UART启动,所以在之前,我重置580,然后在收到0x02 strat字节时重置580,然后发送SOH,LEN_LSB和LEN_MSB我得到了0x06 ACK,所以一切都好,然后我跑了发送图像,但之后我没有得到任何CRC。
同样的图像已成功下载到SPI闪存(SmartSnippets)中,580可以从中启动。
这里附上Saleae分析,我的十六进制和箱子文件(大小为19236 = 4b24)以及我如何发送数据:

1- Like the reporter example : data is aligned(64), the size is divided by 4 and I'm using the same sending function implementation
2- data not aligned , just a normal buffer with the length = size of data and sending it's content byte by byte
但总是相同的结果,有什么遗失吗?

附件:
mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

我无法从UART.LogicData文件中打开启动(似乎文件是空的)。只需从Hex2Bin程序中生产的二进制文件并通过UART下载。如果你不等待CRC并发送0x06,那580是什么?此外,您还可以尝试运行辅助引导程序才能调试此操作,您可以在Keil上运行Bootloader并模拟主引导程序并调试它。此外,您还可以使用智能片段下载UART的文件吗?此外,您可以尝试从不同的对Tx / Rx引导如果可用。我从UART下载图像中占据了捕获。

谢谢mt_dialog.

附件:
Bensalemsaif.
离线
最后一次露面:3年8个月前
加入:2016-02-02 12:42
Hello Mt_dialog,

Hello Mt_dialog,

事实上,我无法使用spi / uart下载smartsnippets的文件(或任何文件),它只通过JTAG完成,否则,我无法删除SPI闪存,这里附上错误:
所以可能是由于造成的问题?

Thanks,

附件:
mt_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2015-06-08 11:34
Hi bensalemsaif,

Hi bensalemsaif,

由于您有一个基本套件,因此智能片段中唯一可用的选项是UART,UART / SPI仅适用于Pro和Expert Kit。要编程SPI Flash您是否使您在基本套件上进行了适当的连接(它需要额外的连接),请按照引脚旁边的图形以进行SPI的连接,此外,您必须连接P0_4跳线并连接使用UART引脚的P0_5。

谢谢mt_dialog.