Skip to content

✨ Add initial cubeMX configuration#48

Open
PedroDeSanti wants to merge 8 commits intomainfrom
feature/new_microcontroller
Open

✨ Add initial cubeMX configuration#48
PedroDeSanti wants to merge 8 commits intomainfrom
feature/new_microcontroller

Conversation

@PedroDeSanti
Copy link
Copy Markdown
Member

Configuração inicial do micro no cube

Copy link
Copy Markdown
Member

@Eduardo-Barreto Eduardo-Barreto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tenho q revisar com mais calma depois devo nao nego pago quando puder

Comment thread cube/micras_v1.ioc
@@ -0,0 +1,602 @@
#MicroXplorer Configuration settings - do not modify
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opa acho q eh bao chamar o outro ioc de micras_v0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

na real eu acho q o meta eh fazer a release e matar o antigo kkkkk aí chama esse só de micras.ioc

Comment thread cube/micras_v1.ioc
Copilot AI review requested due to automatic review settings December 13, 2025 22:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for a new hardware board version (v1) based on the STM32H7 microcontroller family, alongside the existing STM32G4-based board. The changes introduce the necessary CubeMX configuration and platform-specific ADC calibration code.

Key Changes:

  • Added CubeMX configuration file for STM32H725RGVx (STM32H7 family) microcontroller
  • Updated board version identifier to "v1" to distinguish between hardware revisions
  • Implemented platform-specific ADC calibration for both STM32H7 and STM32G4 families

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
CMakeLists.txt Sets BOARD_VERSION to "v1", enabling the use of the micras_v1.ioc configuration file
micras_hal/src/adc_dma.cpp Adds conditional compilation for ADC calibration supporting both STM32H7 (with offset calibration) and STM32G4 platforms
cube/micras_v1.ioc New CubeMX configuration file for STM32H725RGVx with DMA, ADC, timers, UART, and SPI peripherals configured

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#if defined(STM32H7)
HAL_ADCEx_Calibration_Start(this->handle, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED);
#elif defined(STM32G4)
HAL_ADCEx_Calibration_Start(this->handle, ADC_SINGLE_ENDED);
Copy link

Copilot AI Dec 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ADC calibration code only handles STM32H7 and STM32G4 platforms. If this code is compiled for any other platform, the ADC will not be calibrated, which could lead to inaccurate readings. Consider adding an else clause with a compile-time error or warning for unsupported platforms to make this explicit.

Suggested change
HAL_ADCEx_Calibration_Start(this->handle, ADC_SINGLE_ENDED);
HAL_ADCEx_Calibration_Start(this->handle, ADC_SINGLE_ENDED);
#else
#error "ADC calibration is only supported for STM32H7 and STM32G4 platforms."

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants