完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
您好,我使用CY8CITK-062-BLE来测试SMIF XIP模式。
ADVESSS映射到0x18000万U,大小为0x0400万。我还设置了写使能位。 然后,我可以读出这些记忆。但是我不能修改这样的值,*(int *)(0x18000,00)= 0x55。我该怎么办? 下面是代码: /*SMIF IP初始化*/ Cyth-SmifthInIT(SimFiFrasyHW,and SimFiFlash,CONFIG,200,和SimFiFLASH上下文); CysSmifStStaseCudio(SIFIFA FLASH HW,CysSmifSLaveE.SelpTy0,CysSmifdDATAYSEL0); CysSmifMeStLosi-IIT(SimFiFLASH)HW,(CysStfSmifBulthBuffixt**const)和SIMFBuffconcong; /*设置XIP模式*/ Cys-SmifthStEdMe(Smifl Flash HW,Cys-Smif1记忆); Cyth-SmiffSnabl(SmifFlash)HW,(Cyth-StcfSmifTracExt*T*)和SimFiFlash上下文; 它们与由PSoC创建者4.2生成的这些代码相同: SimFiFlash启动(&SIMFBITCCONFIG,200); SimFiFLASH设置模式(Cys-Smiff1内存); smifblockconfig采用SMIF配置工具生成的:内存映射,也可写。 谢谢。! 以上来自于百度翻译 以下为原文 Hello, I use CY8CKIT-062-BLE to test the SMIF XIP mode. The addresss mapped to 0x18000000u, the size is 0x04000000. and I also set up the write enable bit. Then,I can read these memory. But I cannot modify the value like this, *(int *)(0x18000000u) = 0x55. How can I do ? Here is the code: /* SMIF IP initialization */ Cy_SMIF_Init(SMIF_FLASH_HW, &SMIF_FLASH_config, 200, &SMIF_FLASH_context); Cy_SMIF_SetDataSelect(SMIF_FLASH_HW, CY_SMIF_SLAVE_SELECT_0, CY_SMIF_DATA_SEL0); Cy_SMIF_Memslot_Init(SMIF_FLASH_HW, (cy_stc_smif_block_config_t * const)&smifBlockConfig, &SMIF_FLASH_context); /* Set XIP mode */ Cy_SMIF_SetMode(SMIF_FLASH_HW, CY_SMIF_MEMORY); Cy_SMIF_Enable(SMIF_FLASH_HW, (cy_stc_smif_context_t *)&SMIF_FLASH_context); They are the same to these codes who are generated by PSOC creator 4.2: SMIF_FLASH_Start(&smifBlockConfig, 200); SMIF_FLASH_SetMode(CY_SMIF_MEMORY); smifBlockConfig is generated by SMIF configuration tool: memory mapped, also write enable. thanks.! |
|
相关推荐
3个回答
|
|
PSoC Creator,调试& gt;记忆>;0x18000000,数据是正确的。但是,怎么写呢?
以上来自于百度翻译 以下为原文 PSOC creator, Debug-> memory -> 0x18000000 , data is correct. but, how to write? |
|
|
|
尼克,
请注意,XIP模式不支持诸如状态读取等功能。这意味着写入一个闪存设备不支持XIP模式。这是因为写入Flash的操作不仅涉及写命令传输,而且还包括状态验证以验证操作的状态。 以上来自于百度翻译 以下为原文 Nick, Please be aware of that XIP mode does not support functionality such as status reads. This means writing into a flash device not be supported by XIP mode. This is because the writing operation into flash involves not only a write command transfer, but also a status check to verify the status of the operation. |
|
|
|
shide87812 发表于 2018-10-16 13:39 嗨,佛恩, 谢谢你的回复。SMIF可以在CM0中运行而不是CM4吗?我尝试将示例代码CE220823从CM4移到CM0,但它将在忙检查(下面的红线)停止 空读存储器(SmifIyType *BaseDADR,CysStCySmifTraceFixt**SimFieldEnter,UTI8YT RXPrime[],UIT32 32 t RxSead,UIT88T*地址) { 金丝雀属; UIT88T RXBuffeReg; CysSTClSmifMeMixDeFielyFCFG*T*设备= SIFFMEMSCIONS(0)->DeVICEFFG; CysSTClSmifMiMiMCMDYT**CMDRESSTSRGEQE=设备-GT; /*设置QE*/ Smiff1状态=CysSmifMeStLoLo-四分位(Smif11HHW,(Cyth-StcfSmifMeMeMixTyft**)SmifMeTimes(0),和Smif11上下文); 如果(Smiffa状态)!Cys-Smiffa成功 { CysScBuUARTHPUTSHIPE(UARTHYHW) rnrnSMIF CysSmifMeMsLoToLoopRead失败rn“”; 手把手(); } *从外部存储器配置寄存器*读取数据/ SimiFiffSt= CysSmifMeStLoLoMcDeClistsS(BaseAdDR,SimFiMeMefsIs[0),和RxBuffeReRg,(UIT88T)CMDeReStsReq-≫命令,SIMFIVENT; 如果(Smiffa状态)!Cys-Smiffa成功 { CysScBuUARTHPUTSHIPE(UARTHYHW)\rnrnSMIF CysSmifMeMsLoToL.CMDRead失败rn“”; 手把手(); } PRINTF(“接收数据:0x%xrn”,(未签名int)rxBuffeReRg); “Prtf”(“rnQuad I/O读(QIOR 0x%0x)rn”,0x38); /* 4页程序命令*/ SimiFiffSt= CysSmifMeStLoMyCdRADAD(BaseAdDR、SimFiMeMefsIs[0)、地址、RxPuffic、RxSead、和RXCMPLCTCARBACK、以及SMIFE11上下文); 如果(Smiffa状态)!Cys-Smiffa成功 { CysScBuUARTHPUTSHIPE(UARTHYHW) RNRNSMIF CysSmifMeMsLoTyMcDyad失败rn“”; 手把手(); } (CySmithBuyChChin(BaseAdDR)) { /*等待SMIF IP操作完成。*/ } … } 以上来自于百度翻译 以下为原文 Hi fwan, Thanks for your reply. Can SMIF run in CM0 not CM4? I try to move the sample code CE220823 from CM4 to CM0, but it will stop at busy checking ( red line below) void ReadMemory(SMIF_Type *baseaddr, cy_stc_smif_context_t *smifContext, uint8_t rxBuffer[], uint32_t rxSize, uint8_t *address) { cy_en_smif_status_t smif_status; uint8_t rxBuffer_reg; cy_stc_smif_mem_device_cfg_t *device = smifMemConfigs[0]->deviceCfg; cy_stc_smif_mem_cmd_t *cmdreadStsRegQe = device->readStsRegQeCmd; /* Set QE */ smif_status = Cy_SMIF_Memslot_QuadEnable(SMIF_1_HW, (cy_stc_smif_mem_config_t*)smifMemConfigs[0], &SMIF_1_context); if(smif_status!=CY_SMIF_SUCCESS) { Cy_SCB_UART_PutString(UART_HW, "rnrnSMIF Cy_SMIF_Memslot_QuadEnable failedrn"); handle_error(); } /* Read data from the external memory configuration register */ smif_status = Cy_SMIF_Memslot_CmdReadSts(baseaddr, smifMemConfigs[0], &rxBuffer_reg, (uint8_t)cmdreadStsRegQe->command , smifContext); if(smif_status!=CY_SMIF_SUCCESS) { Cy_SCB_UART_PutString(UART_HW, "rnrnSMIF Cy_SMIF_Memslot_CmdReadSts failedrn"); handle_error(); } printf("Received Data: 0x%Xrn", (unsigned int) rxBuffer_reg); printf("rnQuad I/O Read (QIOR 0x%0X) rn", 0x38); /* The 4 Page program command */ smif_status = Cy_SMIF_Memslot_CmdRead(baseaddr, smifMemConfigs[0], address, rxBuffer, rxSize, &RxCmpltCallback, &SMIF_1_context); if(smif_status!=CY_SMIF_SUCCESS) { Cy_SCB_UART_PutString(UART_HW, "rnrnSMIF Cy_SMIF_Memslot_CmdRead failedrn"); handle_error(); } while(Cy_SMIF_BusyCheck(baseaddr)) { /* Wait until the SMIF IP operation is completed. */ } .... } |
|
|
|
只有小组成员才能发言,加入小组>>
751个成员聚集在这个小组
加入小组2065 浏览 1 评论
1824 浏览 1 评论
3633 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1760 浏览 6 评论
1508 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
502浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
355浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
409浏览 2评论
354浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
851浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-20 15:22 , Processed in 0.930969 second(s), Total 50, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号