完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我目前正在使用STM32的sdio接口与esp32-WROOM-32U通讯,我已经按照文档移植了host代码到stm32f429igT6,esp32端也使用编译好的sdio-at固件,并烧录成功这是esp32端日志:
[0;32mI (1146) wifi_init: tcp mss: 1440[0m [0;32mI (1150) wifi_init: WiFi IRAM OP enabled[0m [0;32mI (1155) wifi_init: WiFi RX IRAM OP enabled[0m [0;32mI (1160) wifi_init: WiFi SLP IRAM OP enabled[0m [0;32mI (1165) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07[0m [0;32mI (1172) phy_init: Support multiple PHY init data bins[0m [09:31:56.823]收←◆I (1281) wifi:mode : softAP (c8:f0:9e:e2:d1:f5) I (1282) wifi:Total power save buffer number: 16 I (1283) wifi:Init max length of beacon: 752/752 I (1284) wifi:Init max length of beacon: 752/752 module_name: WROOM-32 max tx power=78, ret=0 I (1296) wifi:set country: cc=CN� [09:31:56.872]收←◆ schan=1 nchan=13 policy=1 [0;32mI (1298) phy_init: PHY init data type updated from DEFAULT to SRRC[0m v3.2.0.0 [0;32mI (1306) SDIO-AT: Cannot get read data address.[0m I (1312) wifi:mode : sta (c8:f0:9e:e2:d1:f4) + softAP (c8:f0:9e:e2:d1:f5) I (1317) wifi:enable tsf I (1324) wifi:mode : softAP (c8:f0:9e:e2:d1:f5) [0;32mI (1336) SDIO-AT: slave ready[0m 并且我已经执行了 ./components/esptool_py/esptool/espefuse.py -p set_flash_voltage 3.3V如下日志 Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting... Detecting chip type... ESP32 === Run "set_flash_voltage" command === Enable internal flash voltage regulator (VDD_SDIO) to 3.3V. The same value for XPD_SDIO_FORCE is already burned. Do not change the efuse. The same value for XPD_SDIO_REG is already burned. Do not change the efuse. The same value for XPD_SDIO_TIEH is already burned. Do not change the efuse. VDD_SDIO setting complete. Check all blocks for burn... idx, BLOCK_NAME, Conclusion Nothing to burn, see messages above. IO13,IO14, IO15, IO2, IO4, IO12 这 6 个管脚使用10K 欧姆电阻进行上拉连接到stm32的sdio引脚; 下面是stm32的sdio部分初始化代码,其他地方没有做修改: sdio_err_t sdio_driver_init(void) { sdio_init_t sdio_init = { .width = WIDTH_4, //历程是WIDTH_1,也尝试了,并不起作用 .clock = 400000 // 12M clock }; sdio_recv_SemHandle = xSemaphoreCreateBinary(); STM32SdioInit(sdio_init); return SDIO_SUCCESS; } 在初始化中调用了下面的函数: void UserEsp32Init(void) { sdio_err_t err; SDIO_LOGI(TAG, "host ready, start initializing slave..."); //HAL_GPIO_WritePin(GPIOC, WIFI_EN_Pin, GPIO_PIN_SET); err = sdio_host_init(); if(err != SDIO_SUCCESS) { printf("SDIO init errorrn"); return; } printf("Sdio init donern"); //xTaskCreate(sdio_send_task, "sdioSendTask", ESP32_SIZE, NULL, osPriorityNormal1, NULL); //xTaskCreate(sdio_recv_task, "sdioRecvTask", ESP32_SIZE, NULL, osPriorityNormal1, NULL); } 下面是stm32的打印,首先已经做了3s的延时等待esp32启动再进行host的初始化: [09:31:54.938]收←◆I STM32_sdio: [Clock] freq=700.4kHz, requested=400.0kHz, divider=255 resp = 0 E STM32_sdio: SdioDriverInit: CMD3 timeout! E STM32_sdio: SdioDriverInit: CMD3 timeout! E STM32_sdio: SdioDriverInit: CMD3 timeout! D STM32_sdio: Relative Card Address: 0x0000 E STM32_sdio: SdioDriverInit: CMD7 timeout! E STM32_sdio: SdioDriverInit: CMD7 timeout! E STM32_sdio: SdioDriverInit: CMD7 timeout! D STM32_sdio: Card selected! RESP1_00000000 E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! I STM32_sdio: Use 4bit bus width E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! esp_slave_init_io E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! D sdio_transport: IOE: 0x00 E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! D sdio_transport: IOR: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: IOE: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: IOE: 0x00 E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! E STM32_sdio: STM32ReadReg: CMD52 timeout! D sdio_transport: IE: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: IE: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: Function 0 BSL: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: Function 0 BSH: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: Function 1 BSL: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: Function 1 BSH: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: Function 2 BSL: 0x00 E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! E STM32_sdio: STM32WriteReg: CMD52 timeout! D sdio_transport: Function 2 BSH: 0x00 我现在不知道问题出在哪里了,查阅了所有文档也没解决 |
|
相关推荐
1个回答
|
|
以下是一些可能的原因及相应的解决方案:
1. **硬件连接问题**:确保STM32和ESP32之间的SDIO数据线、时钟线和电源线连接正确。检查是否有接触不良或焊接问题。 2. **电源问题**:确保STM32和ESP32的电源供应稳定,且电压符合要求。如果电源不稳定,可能会导致通信失败。 3. **时钟配置问题**:检查STM32的时钟配置是否正确。SDIO接口需要一个合适的时钟频率来正常工作。如果时钟频率设置不正确,可能会导致通信失败。 4. **SDIO接口配置问题**:确保STM32的SDIO接口配置正确,包括DMA配置、中断配置等。如果配置不正确,可能会导致通信失败。 5. **固件问题**:检查STM32和ESP32的固件是否正确烧录。如果固件烧录不完整或有错误,可能会导致通信失败。 6. **通信协议问题**:确保STM32和ESP32使用的通信协议一致。如果协议不匹配,可能会导致通信失败。 7. **软件驱动问题**:检查STM32的SDIO驱动是否正确移植和配置。如果驱动有问题,可能会导致通信失败。 8. **ESP32的SDIO模式问题**:确保ESP32的SDIO模式已正确配置。如果ESP32没有正确配置为SDIO模式,可能会导致通信失败。 9. **调试和日志分析**:通过STM32和ESP32的调试信息,分析通信过程中可能出现的问题。这有助于定位问题并找到解决方案。 10. **环境干扰**:检查周围环境是否有电磁干扰或其他干扰源,这些干扰可能会影响SDIO通信。 针对您提供的ESP32端日志,可以看出ESP32已经成功启动并初始化了WiFi模块。但是,这并不能直接说明STM32和ESP32之间的SDIO通信是否成功。您需要进一步检查STM32端的日志和调试信息,以确定通信失败的具体原因。 |
|
|
|
只有小组成员才能发言,加入小组>>
436 浏览 1 评论
1305 浏览 1 评论
599浏览 6评论
498浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
481浏览 5评论
481浏览 4评论
465浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-14 09:07 , Processed in 0.840543 second(s), Total 78, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (威廉希尔官方网站 图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号