Forum > Embedded - ARM

Serial receive on STM32 MBR framework not working (solved)

<< < (2/2)

MiR:
I have fixed the issue, you are right, the RX Pin needs to be set to Input and the pullup/pulldown resistors need to be disabled. I have fixed that and pushed the fix to github.

petex:
Still not working. I updated your latest fix, i have to do the following to get it to work.....



--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- setBaudRate(DefaultUARTBaudRate);  GPIO.PinMode[longWord(aRxPin) and $ff] := TPinMode.Input;//  GPIO.PinDrive[longWord(aRxPin) and $ff] := TPinDrive.None;  GPIO.PinMode[longWord(aTxPin) and $ff] := TPinMode.AF0;  // Set the (very limited) Pin Remapping, RX Pins follow TX Pins as there is only one config bit  

MiR:
Aaargh... The devil is in the detail, the underlying routine for setting pullup/pulldown did not work completely.
Hopefully fixed now, can you please retry?

I am also close to finish I2C and ADC for Bluepill, perhaps you can help me test them when they are done.

When you still find something broken please open an issue @GitHub, makes life easier....

Michael

petex:
I have got it working as expected with the latest update. Thanks.


--- Quote ---I am also close to finish I2C and ADC for Bluepill, perhaps you can help me test them when they are done.

--- End quote ---

I'll check them out when ready.

On a general point........
I did a quick hack of the STM32 C library to get the ADC working in a basic mode. I then discovered some cleaner conversions (namely   unit stm32f103fw Jeppe Johansen,  Bernd Mueller)

This unit does not cleanly compile using the FPC compiler tools you have released. I have tweaked some of it to get the ADC to work. I am assuming that it cleanly compiles with the official ARM compile releases. I do not want to keep re-inventing the wheel here.

So does your MBF framework provide a layer over the current STM32 library conversion ?

As it stands the MBF framework is basic in function and not comprehensive. This is not a criticism as I realise it is work in progress. I would want to extend/add bits when I need them in which case I would look to the STM32 library code.

Will your compiler changes feed back into the official FPC releases at some time ?

When adding a new bit of functionality, I would generally look at the C code examples around and take them as a guide.







Navigation

[0] Message Index

[*] Previous page

Go to full version