2017-07-04 05:59 AM
hi,
i work on WIFI module SPWF04SA and SMT32F401RE with STM32CubeExpansion_WIFI_V3.0.2 (app client_Socket + MDK-ARM V5.22.0.0).
i would like to migrate to STM32F401RB on my board but i have some issues!
Pb1: i migrated RE to RB (source CubeMx V4.21.0)
startup_stm32f401xe.s -> startup_stm32f401xc.s
system_stm32f4xx.c -> new system_stm32f4xx.c
stm32_xx_it.c -> i keep stm32_xx_it.c
STM32F4xx_HAL_Driver -> new STM32F4xx_HAL_Driver
option target (stm32F401RETx -> STM32F401RB, Xtal = 84Mhz)
i miss something?
Pb2: i use external clock 8Mhz and code generated with CubeMx doesn't work!
internal clock with HSI works!!
fct SystemClock_Config(): 84Mhz with HSE
RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;/**Configure the main internal regulator output voltage
*/ __HAL_RCC_PWR_CLK_ENABLE();__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
/**Initializes the CPU, AHB and APB busses clocks
*/ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLM = 8; RCC_OscInitStruct.PLL.PLLN = 336; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4; RCC_OscInitStruct.PLL.PLLQ = 4; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); }/**Initializes the CPU, AHB and APB busses clocks
*/ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{ _Error_Handler(__FILE__, __LINE__); }+ fct SystemCoreClockUpdate();
Pb3: pin RESET PA8 to PC12 locked. i modified fct wifi_reset() declaration of pin wifi_instances_t wifi_instances; by GPIO_InitTypeDef RESET_InitStruct; to configure correctly pin RESET to PC12. Why configuration PC12 is locked (locked to PAx)
Pb4: uart +Dma doesn't work with migration re to rb. stm32 doesn't see communication on uart bus with wifi module (no +WIND scan)
Mridupawan Das, please help....
thks
Yoann
2017-08-01 12:24 AM
Nobody can help me?