Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650, BLE-STACK
Tool/software: TI-RTOS
Can someone point me to example code to read and write to the 1MB serial flash that is provided on the launchpad board?
Thanks.
Dale
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.
Nathan,
Although I have sample code now, I am unable to integrate it into LAUNCHXL-CC2650 ProjectZero code.
I copied the ExtFlash.c and ExtFlash.h into my ProjectZero Applications directory,
When I build, the error I get points me to the fact that simple_peripheral and ProjectZero have different SPICC26XXDMA.h files.
I am surprised that the prominently advertised feature of the LAUNCHXL-CC2650 ("Includes 1 MB external Flash for support of multiple protocols or storing user data") requires such a low level of programming knowledge to use it.
Am I really taking the easiest route to being able to read and write user data to the boards external Flash?
If so, what do I do next? Should I start another topic?
Thanks,
Dale
I had to download and install Simplelink Academy and then it appeared on the left.
I navigated to ProjectZero in the BLE examples and imported the project into CCS.
Wow, it doesn't look at all like the ProjectZero I imported to my IDE from the standard Resource Explorer. This version has the Middleware directory with ExtFlash.h and a greyed out ExtFlash.c (why is it greyed out?).
It also looks like it uses the correct SPICC26XXDMA.h, plus lots more different...
I will try to get external flash routines working in this project.
Thanks,
Dale
Well, not much luck in figuring what to do to be able to use the routines in ExtFlash.c using the ProjectZero for the LAUNCHXL-CC2650 from the SimpleLink Academy as a start point.
So far I have tried un-checking 'Exclude from build' on these files:
middleware/extflash/extflash.c
drivers/spi/ SPICC26XXDMA.c
drivers/spi/spi.c
Then I include ExtFlash.c in project_zero.c with:
#include <ti/mw/extflash/ExtFlash.h> //dale
Then I try to use a function of ExtFlash.c at the end of project_zero.c's ProjectZero_init(void) as follows:
bool success = ExtFlash_open(); //dale
if (success){
Log_info0("Ext Flash Opened, Yeah!!");
}
This just results in build memory errors like this:
"c:/ti/simplelink/ble_sdk_2_02_01_18/src/common/cc26xx/ccs/cc26xx_app.cmd", line 121: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".const" size 0x1ef7 . Available memory ranges:
FLASH size: 0xe000 unused: 0x467 max hole: 0x45c
FLASH_LAST_PAGE size: 0x1000 unused: 0xfa8 max hole: 0xfa8
error #10010: errors encountered during linking; "project_zero_app_cc2650launchxl.out" not built
>> Compilation failure
makefile:190: recipe for target 'project_zero_app_cc2650launchxl.out' failed
makefile:183: recipe for target 'all' failed
gmake[1]: *** [project_zero_app_cc2650launchxl.out] Error 1
gmake: *** [all] Error 2
EDIT: Solved that memory error by disabling all logging and by not starting the uart (so much for that useful tool!!!).
Now, when I try to use ExtFlash_open() as noted above, the program just gets stalled on that line and stays in some assembly code section.
I think I am really lost now.
It just shouldn't be so hard to use the advertised external data storage flash :(
Dale
Nathan,
Thanks for the help but this is still a long ways away from me actually being able to read and write to the external flash.
JXS has helped me in another thread, if anyone want to see this through:
