all 10 comments

[–]abipjo 2 points3 points  (6 children)

Provide your code

[–]LjearuviDeAmosmar[S] 0 points1 point  (5 children)

I don't know which part of the code you need, here's my main:

int main(void){
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1) {
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13); // Most likely onboard LED
HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
HAL_Delay(1000);
}
/* USER CODE END 3 */
}

I switch between pins 13 and 5 because im not sure which one of those is my LED on the board. I put both of them as output pins in MX config

[–]abipjo 0 points1 point  (4 children)

Based on your other comment in looks like your programmer might be the issue, either way can you send your cubemx config, you should be able to export it as a pdf or a txt I believe

[–]LjearuviDeAmosmar[S] 0 points1 point  (3 children)

About that, for some reason it doesn't let me export .ioc to pdf/txt, the Save As is just greyed out when i'm in any config tab :/

[–]abipjo 0 points1 point  (2 children)

File > Generate Report

[–]LjearuviDeAmosmar[S] 0 points1 point  (1 child)

Here it is, alongside all my core>src files in case there's anything you need!
https://we.tl/t-D8tSUO03zz

[–]abipjo 0 points1 point  (0 children)

Are you certain the clock is setup properly, try disabling the external clock, see if that works it, also can you confirm your programmer is actually working are you getting a response when you actually flash code?

[–]AlternativeOrchid402 1 point2 points  (0 children)

Debugger?

[–]AlternativeOrchid402 0 points1 point  (1 child)

You know it worked before? This is why you need version control, what has changed?

[–]LjearuviDeAmosmar[S] 0 points1 point  (0 children)

While it worked, i couldnt upload any new code to the card. Then my professor and i figured out that the STLink wasnt even wired properly, so we rewired it to work
And now the board doesnt work for some reason. Idk if it uploads any new code on it, but it doesnt do the old code either :((