Hyperflash non blocking transfer causing instruction access violation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Hyperflash non blocking transfer causing instruction access violation

ソリューションへジャンプ
2,117件の閲覧回数
Abstractsig
Contributor I

I am testing the imxrt1050evbk with the flexspi hyper flash polling transfer example.

I have modified the function flexspi_nor_flash_erase_sector() to use FLEXSPI_TransferNonBlocking() instead of FLEXSPI_TransferBlocking() as shown below.

When I do this I get an instruction access violation when execution returns from the FLEXSPI_TransferNonBlocking() call.  However if I put a debug breakpoint after this call and manually continue each loop I do not get the fault.

Any hints on what might be causing this or suggestions on how I might further debug my example would be appreciated.

Thanks

 

 

 

 


volatile bool ___done;

void
flexspi_transfer_callback_1 (FLEXSPI_Type *base,flexspi_handle_t *handle,status_t status,void *userData) {
___done = true;
}

flexspi_handle_t es_handle;

status_t flexspi_nor_flash_erase_sector_nb (FLEXSPI_Type *base, uint32_t address)
{
status_t status;
flexspi_transfer_t flashXfer;

/* Write enable */
status = flexspi_nor_write_enable(base, address);

if (status != kStatus_Success)
{
return status;
}

flashXfer.deviceAddress = address;
flashXfer.port = kFLEXSPI_PortA1;
flashXfer.cmdType = kFLEXSPI_Command;
flashXfer.SeqNumber = 4;
flashXfer.seqIndex = HYPERFLASH_CMD_LUT_SEQ_IDX_ERASESECTOR;

FLEXSPI_TransferCreateHandle(base,&es_handle,flexspi_transfer_callback_1,NULL);

___done = false;
FLEXSPI_TransferNonBlocking (base,&es_handle,&flashXfer);

size_t count;

while ( FLEXSPI_TransferGetCount (base,&es_handle,&count) != kStatus_NoTransferInProgress);

/* Do software reset. */
FLEXSPI_SoftwareReset(EXAMPLE_FLEXSPI);

return status;
}

 

 

 

ラベル(1)
0 件の賞賛
返信
1 解決策
2,111件の閲覧回数
Abstractsig
Contributor I

In answer to my own question.

It seems the fault occurs because the example puts the interrupt vector table in flash.

Moving the vector table to ram stops the access violation fault.

 

 

 

元の投稿で解決策を見る

2 返答(返信)
903件の閲覧回数
RajPadmani
Contributor II
Hi,
I am working on km34 for the flash read/write operation while continuous interrupts of ADC and timer (1 ms) but it shows it goes into hardflaut error, so i move my vector table to ram but still not able to flash operation and code continuous reset.

0 件の賞賛
返信
2,112件の閲覧回数
Abstractsig
Contributor I

In answer to my own question.

It seems the fault occurs because the example puts the interrupt vector table in flash.

Moving the vector table to ram stops the access violation fault.