Hi,
I have Nordic Nrf51822 custom board.
in that we have spi Nor flash.
i check the spi read and write with an application without soft device enabled.
which is working fine.
but when i flash soft device hex file.
i am not able to get advertisement.
here is my code:
uint32_t err_code;
timers_init();
gpiote_init();
buttons_init();
NRF_GPIO->PIN_CNF[30]=0x09;
NRF_GPIO->OUTSET=(1<<30);
NRF_GPIO->PIN_CNF[27]=0x09;
NRF_GPIO->OUTSET=(1<<27);
NRF_GPIO->PIN_CNF[28]=0x09;
NRF_GPIO->OUTSET=(1<<28);
spi_master_init(SPI0,SPI_MODE0,0);
FLASH_DEVICE_OBJECT fdo; /* flash device object */
ParameterType para; /* parameters used for all operation */
ReturnType ret; /* return variable */
NMX_uint8 rbuffer[16]; /* read buffer */
NMX_uint8 wbuffer[16] = /* write buffer */
{
0xAB, 0x12, 0xFE, 0xED, 0xBE, 0xEF, 0xFE, 0xED,
0xCD, 0x13, 0xFE, 0xED, 0xBE, 0xEF, 0xFE, 0xED
};
ret = Driver_Init(&fdo); /* initialize the flash driver */
bond_manager_init();
ble_stack_init();
radio_notification_init();
// Initialize Bluetooth Stack parameters
gap_params_init();
advertising_init();
services_init();
conn_params_init();
sec_params_init();
// Actually start advertising
advertising_start();
// Enter main loop
for (;;)
{
// Switch to a low power state until an event is available for the application
err_code = sd_app_event_wait();
APP_ERROR_CHECK(err_code);
}
}
once i commented Driver_Init(&fdo); function ,i am getting advertisement.
but once i call that function , i am not getting advertisement.
and also i check by commenting all instruction in function definition Driver_Init(&fdo);
then i am not getting advertisement
my code size with Driver_Init(&fdo); function is 21608.
by commenting Driver_Init(&fdo); function is 15440.
Kindly tell me is code size will be issue or something else.
i am using spi_master.c file for spi communication.
Regards Balaji