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.

CCS/LAUNCHXL-CC2640R2: LAUNCHXL-CC2640R2

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

ABORT - ABNORMAL PROGRAM TERMINATION.  CURRENTLY JUST HALTS EXECUTION. 

I am interfacing an external flash memory(IS25LP128)with CC2640R2  launchpad. they are connected via the SPI.I just need to read the device ID of external flash.but when i try to run the code an exit.c file is creating.and in the debugging session it's showing memory map prevented reading.

here is my code,

#include <xdc/std.h>
#include <xdc/runtime/System.h>

/* BIOS Module Headers */
#include <ti/sysbios/BIOS.h>
#include <ti/drivers/GPIO.h>
#include <ti/drivers/SPI.h>

/* Example/Board Header files */
#include "Board.h"
#include <stdint.h>
#include <stddef.h>
#include <stdio.h>
void *mainThread(void *arg0)
{

int MSGSIZE = 4;
SPI_Handle spi;
SPI_Params spiParams;
SPI_Transaction spiTransaction;
uint8_t transmitBuffer[MSGSIZE];
uint8_t recieveBuffer[MSGSIZE];
bool transferOK = FALSE;

Board_initGeneral();

SPI_init();
SPI_Params_init(&spiParams);
spiParams.dataSize = 8;
// spiParams.bitRate = 4000000;
spiParams.mode = SPI_MASTER; //0

/* Call driver init functions */

spi = SPI_open(Board_SPI0, &spiParams);
transmitBuffer[0] = 0x90;
transmitBuffer[1] = 0x00;
transmitBuffer[2] = 0x00;
transmitBuffer[3] = 0x00;
spiTransaction.count = MSGSIZE;
spiTransaction.txBuf = transmitBuffer;
spiTransaction.rxBuf = recieveBuffer;

transferOK = SPI_transfer(spi, &spiTransaction);
if(!transferOK)
{

}
BIOS_exit(0); /* terminates program and dumps SysMin output */
return(0);
}

please help to solve this problem

  • Hi,
    Just wondering why the .bitRate is commented out in your code.
    Also, see if the nvsexternal_CC2640xx_xx example in the SDK will help. The example uses SPI to interface with external flash.