关于CC2530 使用DEBUG编程另一个CC2530的问题 program flash
我根据TI提供的
[1] Flash programming of CC253x/4x devices code example
http://www.ti.com/lit/zip/swra410
例子想实现一个CC2530通过IO口对另一个CC2530的 DD DC实现烧录程序时,发现以下函数只能访问 0X0000 - 0XFFFF,如何实现全整个HEX文件烧录到CC2530的FLASH中去
void write_flash_memory_block(unsigned char *src, unsigned long start_addr,
unsigned short num_bytes)
{
u8 retry = 0;
unsigned char len[2];
len[0] = HIBYTE(num_bytes);
len[1] = LOBYTE(num_bytes);
//log("write_flash_memory_block\n");
// 1. Write the 2 DMA descriptors to RAM
write_xdata_memory_block(ADDR_DMA_DESC_0, dma_desc_0, 8);
write_xdata_memory_block(ADDR_DMA_DESC_1, dma_desc_1, 8);
// 2. Update LEN value in DUP's DMA descriptors
write_xdata_memory_block((ADDR_DMA_DESC_0+4), len, 2); // LEN, DBG => ram
write_xdata_memory_block((ADDR_DMA_DESC_1+4), len, 2); // LEN, ram => flash
// 3. Set DMA controller pointer to the DMA descriptors
write_xdata_memory(DUP_DMA0CFGH, HIBYTE(ADDR_DMA_DESC_0));
write_xdata_memory(DUP_DMA0CFGL, LOBYTE(ADDR_DMA_DESC_0));
write_xdata_memory(DUP_DMA1CFGH, HIBYTE(ADDR_DMA_DESC_1));
write_xdata_memory(DUP_DMA1CFGL, LOBYTE(ADDR_DMA_DESC_1));
// 4. Set Flash controller start address (wants 16MSb of 18 bit address)
write_xdata_memory(DUP_FADDRH, HIBYTE( (start_addr>>2) ));
write_xdata_memory(DUP_FADDRL, LOBYTE( (start_addr>>2) ));
// 5. Arm DBG=>buffer DMA channel and start burst write
write_xdata_memory(DUP_DMAARM, CH_DBG_TO_BUF0);
burst_write_block(src, num_bytes);
// 6. Start programming: buffer to flash
write_xdata_memory(DUP_DMAARM, CH_BUF0_TO_FLASH);
write_xdata_memory(DUP_FCTL, 0x06);
// 7. Wait until flash controller is done
while (read_xdata_memory(DUP_FCTL) & 0x80);
}
请问TI的技术支持,如何才能实现将整个HEX烧录文件写到目标FLASH区域呢,谢谢!
因为我们产品中使用的是 STM32与CC2530相连,生产时,直接使用串口烧录STM32后,再通过STM32直接烧录CC2530,能否提供一下相关的资料和方法,谢谢,主要是指量烧时,再使用你们官方的flash programmer,要预留两个接口,而且后面升级不方便。
文档中提到的例程你可以正常的烧录么?用CC2530给CC2530进行程序的烧录
你好。我参考Flash programming of CC253x/4x devices code example及3817.Flash Programming of CC253x4x devices swra410.pdf 直接把代码下到一个CC2530上面,然后参照SWRA410里面的连接4跟线:DC DD RESET GND,连接到另一个CC2530的Debug口上,发现擦除、写FASH都不成功,请问可能是什么原因?