您好 Champ、
在执行闪存扇区 擦除函数期间、 我能否在 while 环路中添加 CAN 发送代码。 有什么需要 注意的吗?
Fapi_issue19 CommandWithAddress (Fapi_EraseSector、flash_sector[i].start);
while (fapi_check_FSM_ready_busy =fapi_Status_FsmBusy)
{
CANtrasmit();
}
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.
您好 Champ、
在执行闪存扇区 擦除函数期间、 我能否在 while 环路中添加 CAN 发送代码。 有什么需要 注意的吗?
Fapi_issue19 CommandWithAddress (Fapi_EraseSector、flash_sector[i].start);
while (fapi_check_FSM_ready_busy =fapi_Status_FsmBusy)
{
CANtrasmit();
}
您好、Huihuang、
如果可以使用将函数分配给链接器 cmd 文件中的某个段,则在 man()中执行 memcopy,但不会将此段复制到 SRAM:
部分
{
.intvecs:{}>向量
CANTX:
{
.\source\CAN.obj (.text)
}palign =8 load = FLASH、run = SRAM、load_start (cantxLoadStart)、run_start (cantxRunStart)、size (cantxLoadSize)
在 main.c 中:
extern unsigned int cantxLoadStart;
extern unsigned int cantxLoadSize;
extern unsigned int cantxRunStart;
main(){
memcpy (&cantxRunStart、&cantxLoadStart、(uint32)&cantxLoadSize);
}
BTW、为什么您的客户在此循环中传输 CAN 消息、以检查闪存状态机的状态? 您的客户擦除闪存扇区的频率如何?
您可以使用 ramfunc 在 RAM 中运行函数:
链接器命令:
binit:{}> FLASH0
.TI.ramfunc:{} load=FLASH0, run=RAM, table(BINIT)
main.c:
__attribute__( ramfunc ))
void myRamFunc (void){
uint32 i、j;
for (i=0;i<100;i++){
J=2*I;
}
}
myRamFunc ()将被复制到 RAM 中,因此您可以从 RAM 中运行此函数。