Closed poky99 closed 5 years ago
Hi @poky99 could you add more info. Host OS? Arduino IDE version? Core version? Board info (schematics, pinouts,...)? And what exactly does not work?
here is my post http://www.stm32duino.com/viewtopic.php?f=39&t=4701&start=10#p54744 MCU STM32F401CCU6 OS Win x64, IDE 1.8.9 Core 1.6 Even the Blink test doesn't work. Checked in SystemWorkbench works, and took settings from it
Hard to tell without a schematics...
is the LED really on PC13
?
Is the HSE
really 25MHz?
Maybe it crashes in one _Error_Handler
in SystemClock_Config
...
Best way is you try to debug.
Yes LED = PC13 HSE = 25
Your clock config is not correct as the USB clock is 42 MHz instead of 48MHz, you could try this one to get it:
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 = 25;
RCC_OscInitStruct.PLL.PLLN = 336;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
RCC_OscInitStruct.PLL.PLLQ = 7;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
/** 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();
}
#define NUM_ANALOG_INPUTS 5
#define NUM_ANALOG_FIRST 10
Considering your comments this should be:
#define NUM_ANALOG_INPUTS 10
#define NUM_ANALOG_FIRST 20
Yes, I have installed
Made changes but without result
Unfortunately, I will not be able to help more... As I do not have the board, I could not perform any tests/debug. You an try one of those method to debug: https://github.com/stm32duino/wiki/wiki/How-to-debug
Yes, I have installed
define NUM_ANALOG_INPUTS 10
define NUM_ANALOG_FIRST 20
Made changes but without result
And you made the clock config changes?
Yes
What about your PeripheralPins.c, PinNamesVar.h, & ldscript.ld ?
If those are misconfigured - reuse in different modules etc could that not also cause issues @fpistm (more so PeripheralPins.c I guess?)
PeripheralPins.c & PinNamesVar.h from https://github.com/stm32duino/Arduino_Tools/tree/master/src/genpinmap/Arduino STM32F401C(B-C)Ux
Thank. Forgot to replace ldscript.ld
@BennehBoy I assumed it correct as it succeed to flash anyway seems not 🙄
Can you submit a PR so us folk don't have to rework this ourselves, I have these boards in the post to me 😄
Will F401cc add to the 1.7.0 release?
Will F401cc add to the 1.7.0 release?
If someone submit a PR, it could.
I'll submit a PR as soon as my board is here and it can be tested - otherwise anyone else should feel free to do so...
On Mon, Jun 24, 2019 at 6:41 AM Frederic Pillon notifications@github.com wrote:
Will F401cc add to the 1.7.0 release?
If someone submit a PR, it could.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stm32duino/Arduino_Core_STM32/issues/545?email_source=notifications&email_token=AF6R4XWB7QJYCFGPFMBR2TLP4BM6ZA5CNFSM4H2PX6I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYL2EOQ#issuecomment-504865338, or mute the thread https://github.com/notifications/unsubscribe-auth/AF6R4XR2Y3EGBDQ4AO74BN3P4BM6ZANCNFSM4H2PX6IQ .
I tested I2C1 - work I2C2 - work I2C3 - work USB CDC - work RTC - work SPI - work
My boards arrived, just looking at creating a variant for this and I notice that you didn't comment any of the alternate assignments out in peripheralpins.c - this I believe means that the last assigment will be the default ones? @fpistm can you confirm? Presumably there may be some timer conficts this way?
My boards arrived, just looking at creating a variant for this and I notice that you didn't comment any of the alternate assignments out in peripheralpins.c - this I believe means that the last assigment will be the default ones? @fpistm can you confirm? Presumably there may be some timer conficts this way?
I do not use remap, and so far there is no time to use this board in any project. I checked all I2C, UART and SPI.
Which UART's did you check?
USART2 & 6 won't initialise (6 conflicts with USB)
-DENABLE_HWSERIAL2 in build_opt.h does not result in a defined Serial2 device
I'm sorry, I did not write a post correctly. All I2C, USART1 SPI1, USB CDC
Thanks 👍
For array in PeripheralPins.c
this is the first PinName found which will be used.
OK, I knew it was one way round or the other, thanks for clarifying.
Good day. I add a new board STM32F401CCU6 I have something that does not work.
boards.txt
variant.h
variant.cpp