[ell-i-developers] Re: Serial on stm32f334nucleo

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Thu, 18 Sep 2014 08:22:11 +0300

The code looks good to me, though I'm wondering where the correct baud rate 
comes from.

Anyway, could someone please verify this independently?  With a test report I'm 
willing to merge.

--Pekka


On 2014–09–17, at 22:31 , Ivan Raul <supra.material@xxxxxxxxx> wrote:

> Hi to all,
> 
> I was wondering if it is possible to receive serial communication through the 
> stlink bridge of the nucleo. In fact, is possible, and I already provided a 
> pull request for the change. I hope it helps a little for the testing of the 
> new PoElli in the next weeks.
> 
> Please, test accordingly :)
> 
> mkdir temp
> cd temp
> git clone https://github.com/supramaterial/Runtime.git
> cd Runtime/stm32/build/
> make sketch.cpp
> 
> #then, for testing, modify the sketch.cpp to something like this:
> ##---------------------------
> 
> #include <Arduino.h>
> 
> void setup() {
>     Serial.begin(57600);
> }
> 
> void loop() {
> 
>     Serial.write('H');
>     Serial.write('e');
>     Serial.write('l');
>     Serial.write('l');
>     Serial.write('o');
>     Serial.write('\r');
>     Serial.write('\n');
> 
>     for (volatile int i = 0; i < 100000; i++)
>         ;
> 
> }
> 
> ##------------------------
> 
> #then
> make VARIANT=stm32f334nucleo
> 
> #and flash
> sudo st-flash write hardware/stm32f334nucleo/sketch.bin 0x8000000
> 
> #the good part is that the stlink controller provides the USART2 through
> #the usb, in linux it shows as /dev/ttyACM0
> 
> #now, to test, use a serial console, minicom, for example
> 
> #if minicom not installed
> sudo apt-get install minicom
> sudo minicom -s
> #go to "serial port setup"
> #configure in this way
> 
> +------------------------------------------
> | A -    Serial Device      : /dev/ttyACM0 
> | B - Lockfile Location     : /var/lock    
> | C -   Callin Program      :              
> | D -  Callout Program      :              
> | E -    Bps/Par/Bits       : 57600 8N1    
> | F - Hardware Flow Control : No           
> | G - Software Flow Control : No           
> |                                          
> |    Change which setting?                 
> +------------------------------------------
> 
> #then "save setup as dfl"
> 
> #and run minicom
> sudo minicom
> 
> #it should show "hello" iteratively
> 
> With Warm Regards, Ivan Raul

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Other related posts: