Hi Rushikesh, The ttyS0 is the console serial port.
Try to study about Linux to understand these concepts. BR, Alan On Friday, September 3, 2021, rushi ghatkar <rushighatka...@gmail.com> wrote: > Hi, > > I have run sample serial examples like* serialblaster*, *serialrx* but I > have one doubt is that, when we give devpath as* /dev/ttyS0* , we are able > to connect and communicate with the nsh console. > > Is it really a* uart/usart communication* happening or are we just using > virtual com port to communicate? Means in these sample examples, *no uart > send or receive function* used like in* nuttx/drivers/serial* folder they > have mentioned? Only *read/write* file function is used. > > Is it possible to use those defined functions in app side from > *nuttx/drivers/serial?* > > Please clear my doubts. > > > Regards, > Rushikesh Ghatkar > > > > On Tue, Aug 31, 2021 at 6:34 PM Alan Carvalho de Assis <acas...@gmail.com> > wrote: > > > You need to enable: USARTx peripheral, setup your Driver -> Serial to > > correct baudrate, etc and then you can run the serialrx example. > > > > BUT you need to setup CONFIG_EXAMPLES_SERIALRX_DEVPATH to the right > > port, i.e.: /dev/ttyS1 > > > > Before mastering NuttX it is important that you know Linux, otherwise > > you will run in circles. > > > > BR, > > > > Alan > > > > On 8/31/21, rushi ghatkar <rushighatka...@gmail.com> wrote: > > > Hi Alan Sir, > > > > > > Thanks for your reply. > > > > > > The serial driver already exists for STM32H7. Are we willing to > > > exchange data over serial port? > > > -> Yes sir. I want to transmit and receive data using uart. > > > > > > Just do the same thing you do on Linux: open(), tcflush(), tcsetatt > > > -> these functions we have to use while creating our own driver??? > > > > > > > > > I was trying to run a sample example of a serial driver for uart. But > it > > > gives errors. Could you please tell me how to get it working? > > > > > > > > > > > > Thanks & Regards, > > > Rushikesh Ghatkar > > > > > > > > > > > > > > > > > > On Mon, Aug 30, 2021 at 6:43 PM Alan Carvalho de Assis < > > acas...@gmail.com> > > > wrote: > > > > > >> Hi Rushikesh, > > >> > > >> The serial driver already exists for STM32H7. Are we willing to > > >> exchange data over serial port? > > >> > > >> Just do the same thing you do on Linux: open(), tcflush(), > tcsetattr(), > > >> etc. > > >> > > >> You need to use /dev/ttyS1..N the /dev/ttyACM0 is for USB/Serial > > example. > > >> > > >> BR, > > >> > > >> Alan > > >> > > >> On 8/30/21, rushi ghatkar <rushighatka...@gmail.com> wrote: > > >> > Hi, > > >> > > > >> > I am trying to create my own uart serial driver which includes > > transmit > > >> and > > >> > receive data . > > >> > > > >> > For that i was trying to understand a sample example which is given > > >> > already. For this example given file are mentioned below, > > >> > In nuttx folder, > > >> > 1. nuttx/drivers/serial.c > > >> > 2. nuttx/include/nuttx/serial/serial.h > > >> > But in *nuttx/boards/arm/stm32h7/nucleo-h743zi2/src* no file is > > >> > present > > >> > for the serial driver. So here do we have to create a file or the > > >> > driver > > >> > will work as it is? > > >> > > > >> > In app folder, > > >> > apps/examples/serialrx/serialrx_main.c devpath given like this > > >> > */dev/ttyS0 > > >> > , *what does this mean? as per my board device port is ACM0, so > > should > > >> > i > > >> > include */dev/ttyACM0* instead of */dev/ttyS0.* > > >> > > > >> > In menuconfig, i have selected *serial RX example*, > > >> > > > >> > How to make it run, does anyone please tell me how this example is > > >> working. > > >> > > > >> > > > >> > Thanks & Regards, > > >> > Rushikesh Ghatkar > > >> > > > >> > > > > > >