Skip to content

Conversation

TheCodeSharman
Copy link
Contributor

This PR fixes an issue where the following is returning false for the STM32F411xE chip:

IS_ADC_CHANNEL(ADC_CHANNEL_TEMPSENSOR)

As a result of this the example code on the Wiki for reading the internal temperature sensor returns a result of -266 because analogRead(ATEMP) always returns 0 indicating an error.

Note: Reviewing the code it looks like the definition of ADC_CHANNEL_TEMPSENSOR is inconsistent with the definition of IS_ADC_CHANNEL for other boards too? I've only made the minimal changes for the board I own however.

@fpistm
Copy link
Member

fpistm commented Sep 1, 2020

Hi @TheCodeSharman
Thanks for the PR.
Did you submit this fix to the STM32CubeF4 repo ?
https://github.com/STMicroelectronics/STM32CubeF4

@TheCodeSharman
Copy link
Contributor Author

Did you submit this fix to the STM32CubeF4 repo ?
https://github.com/STMicroelectronics/STM32CubeF4
No I haven't.

@fpistm
Copy link
Member

fpistm commented Sep 1, 2020

@TheCodeSharman
Could you submit an issue or a PR to the official GitHub repo in order to have the fix in a later release.
Else when updating the STM32CubeF4 you change will be lost.

About the PIO change, I have no knowledge about this. Is is a recent change? @valeros could you tell me if this change is required? Thanks in advance.

@valeros
Copy link
Contributor

valeros commented Sep 2, 2020

Hi @fpistm ! Yes, the changes are actual, but it might be a good idea if I submit a new PR with the latest revision of our build script.

I suppose this PR isn't going to be merged, but anyway @TheCodeSharman do you mind deleting changes in tools/platformio-build.py? They seem a bit out of scope for this PR. Thanks!

PS: @fpistm Could you please shed some light on your ETA of the the next stable release of the STM32 Arduino core?

@fpistm
Copy link
Member

fpistm commented Sep 2, 2020

@valeros
Currently, I've not a real planned release date. Probably not before 2 month. I've a lot of work before release the 2.0.0.

And yes the PIO commit is out of scope of the PR. So, if you can provide a separate PR that would be great.
Thanks.

@TheCodeSharman
Copy link
Contributor Author

Done. That was meant for a different branch.

@TheCodeSharman
Copy link
Contributor Author

OK I've made this same PR on the upstream repo: STMicroelectronics/STM32CubeF4#36 -

@fpistm
Copy link
Member

fpistm commented Sep 2, 2020

Thanks @TheCodeSharman
Like this I will be able to store the patch for further update if it is ok.

@fpistm fpistm self-requested a review September 4, 2020 07:50
@fpistm fpistm added the fix 🩹 Bug fix label Sep 4, 2020
@fpistm fpistm added this to the 2.0.0 milestone Sep 4, 2020
Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm merged commit 8c34ed0 into stm32duino:master Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 🩹 Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants