Hello @Robin_Shen
Thanks for the replay , sorry for confusing with my wordings in previous post , actually here am already using PAL driver & they are serving my purpose, now am in situation where i need to reuse same drivers before RTOS get started right after PIN_DRV_INIT().
here below is my code snippet
static uint8_t TxData_au8[2U] = { 0x01, 0x02 };
static uint8_t RxData_au8[2u];
static boolean SPI_Transfer_CompFlag;
static void SBC_Test(void)
{
SPI_MasterInit(&SPI_PERIInstance, &SPI_PERI_MasterConfig);
INT_SYS_SetPriority(g_lpspiIrqId[SPI_PERIInstance.instIdx], 0);
if(STATUS_SUCCESS == SPI_MasterTransfer(&SPI_PERIInstance,TxData_au8,RxData_au8,1))
{
while (false == SPI_Transfer_CompFlag);
return RxData_au8;
}
}
void SPI1_TxRxTransferCompleteCB(void *driverState, spi_event_t event, void *userData)
{
SPI_Transfer_CompFlag = true;
}
The reason for using SPI_MasterTransfer() as a blocking call since it not using any RTOS functions, as you see in my code snippet it is working fine as expected when I set priority to 0 and for other priorities(default or 1) it won't coming to call back function.
below are the screen shots of the NVIC registers which says other interrupts are not set yet.
priority 0
priority 1