Hello,
does anybody know where can I find document or releated information for CC2530 Debug and Programming interface specification?
Any help would be appreciated.
regards,
Ketan
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm looking for the same thing ! ... I've found main things (protocol, debug commands, ...) in these documents:
* "CC1110/ CC2430/ CC2510 Debug and Programming Interface Specification" - SWRA124
* "CC2430 to CC2530 Migration Guide" - SWRA287
and CC2530 User guide.
But I've some issues with flash routine ... Flash controller registers are now on 16 bit address so the ASM routine included in SWRA124 must be updated.
I've tried few things like using "burst_write" command and a DMA init routine but without success ...
Is the SWRA124 documentation was updated with CC2530 specific commands somewhere ?
Martin
See the 260 page CC253x user guide at http://focus.ti.com/lit/ug/swru191/swru191.pdf Also there are several reference designs for the CC2530 complete with schematics at Ti.com
I have got flashing working on my board with DMA option.
I got a sample from TI's RF discussion forum and with that I was able to make my applicaiton flashing CC2530.
For your query if you want to write into the 16bit register then you have to execute an instruction (not sure as of now but you will find in 8051 instruction set) through debug interface to get your data loaded into the 16bit register. It is similar to normal instruction execution for register write but only the opcode for instruction and parameters are different.
regards,
Ketan
KetanPatel said:I have got flashing working on my board with DMA option
OK, I believe you must use "burst_write" debug command to do that ... How do you initialize DMA channel to address FLASH banks ?
KetanPatel said:I got a sample from TI's RF discussion forum
Do you remember where you found that ?
Thanks for your help,
Martin
HI,
Martin,
& TI
I am building CC2530 programmer using code presented in 3580.attachement.zip.
I am using Burst write and 4 DMA channel as used in sample code.
But somehow I am my Burst write mode is not working.
Ater sending command of burst write command I am transferring block of 1024 byte. After burst write when I can check data at 0x0000[First buffer], Data is random and not what I written to..
I checked DMA channel configuration and DEBUG config register, DMA1FGH/L registering is having correct value what i written.
In short DMA transfer is not working,I am using CLKCONCMD=0x59, CLKCONSTA=0x6f, I don't know why these register has different value..
I need your help on this.
I got my solution.
I was using incorrect address for SFR. I must use SFR address maped to zdata memory like 0x70[SFR address]
I got my solution.
I was using incorrect address for SFR. I must use SFR address maped to xdata memory like 0x70[SFR address]
Examples of just a few bytes written to flash in this step, I was successful, but I would like to write a few into, but after writing a few bytes written 30 does not go, and why.
void main(void)
{
unsigned char chip_id = 0;
unsigned char debug_config = 0;
//unsigned short j;
/****************************************
* Initialize programmer
*****************************************/
programmer_init();
/****************************************
* Initialize debug interface
*****************************************/
// Put the DUP in debug mode
debug_init();
/****************************************
* Read chip ID
*****************************************/
chip_id = read_chip_id();
if(chip_id == 0) {
while(1); // No chip detected.
}
/****************************************
* Initialize DUP
*****************************************/
// Switch DUP to external crystal osc. (XOSC) and wait for it to be stable.
// This is recommended if XOSC is available during programming. If
// XOSC is not available, comment out these two lines.
write_xdata_memory(DUP_CLKCONCMD, 0x80);
while (read_xdata_memory(DUP_CLKCONSTA) != 0x80);
/****************************************
* Erase entire chip memory
*****************************************/
chip_erase();
/****************************************
* Write FLASH memory
*****************************************/
// Enable DMA (Disable DMA_PAUSE bit in debug configuration)
debug_config = 0x22;
debug_command(CMD_WR_CONFIG, &debug_config, 1);
// Program data (start address must be word aligned [32 bit])
write_flash_memory_block(write_data,0x0100+4, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*2, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*3, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*4, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*5, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*6, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*7, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*8, 4); // src, address, count
write_flash_memory_block(write_data,0x0100+4*9, 4); // src, address, count
//write_flash_memory_block(write_data,0x0100+4*25, 4); // src, address, count
//write_flash_memory_block(write_data,0x0100+4*26, 4); // src, address, count
/****************************************
* Read FLASH memory
*****************************************/
// Read 4 bytes starting at flash address 0x0100 (flash bank 0)
read_flash_memory_block(0, 0x0100+4, 4, read_data); // Bank, address, count, dest.
/****************************************
* Verification
*****************************************/
// Bytwise check of read and written data
for(unsigned char i = 0; i < sizeof(read_data); i++) {
if(read_data[i] != write_data[i]) {
// Fail
while(1);
}
}
// Infinite loop
while(1);
}