Search found 38 matches

by antoniolinux
Mon Oct 26, 2015 5:07 pm
Forum: STM32 Support
Topic: UART and buffer
Replies: 2
Views: 1931

Re: UART and buffer

hi, in this period i have a similar problem, you can use Serial Driver in this metodology you can use 1) Event you can see this http://forum.chibios.org/phpbb/viewtopic.php?f=16&t=2944 or 2) use chnRead(&SD1,&bufferMsg,64); if you want use uart directly, you know is very hard to learn
by antoniolinux
Mon Oct 26, 2015 4:47 pm
Forum: STM32 Support
Topic: Serial Driver and CHN_INPUT_AVAILABLE
Replies: 2
Views: 1884

Re: Serial Driver and CHN_INPUT_AVAILABLE

i fix it, the code that i write is good but i set the pull UP the pin RX for use it

Code: Select all

  palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(7)); //tx
  palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(7)); //rx
  palSetPadMode(GPIOA,10,PAL_MODE_INPUT_PULLUP);

thanks for all.
A.
by antoniolinux
Mon Oct 26, 2015 12:18 pm
Forum: STM32 Support
Topic: Serial Driver and CHN_INPUT_AVAILABLE
Replies: 2
Views: 1884

Serial Driver and CHN_INPUT_AVAILABLE

Hi to all, i connect with a wire PA9 and PA10, i want similate when arrived data on SD1, when arrived daa on sd1 start a event if i write this static THD_WORKING_AREA(waRead5, 128); static THD_FUNCTION(Thread5,arg) { (void)arg; chRegSetThreadName("th_Riempio_Buffer"); event_listener_t Uart...
by antoniolinux
Fri Oct 23, 2015 1:57 pm
Forum: STM32 Support
Topic: IRQ, EVENT and Srial Driver
Replies: 5
Views: 3090

Re: IRQ, EVENT and Srial Driver

hi to all, i want start a event when on SD1 arrived data, i wired the pin tx and rx for simulate the arrive data on SD1, i fix some errore in last post, and write this code: static THD_WORKING_AREA(waRead5, 128); static THD_FUNCTION(Thread5,arg) { (void)arg; chRegSetThreadName("th_Riempio_Buffe...
by antoniolinux
Fri Oct 23, 2015 10:19 am
Forum: STM32 Support
Topic: IRQ, EVENT and Srial Driver
Replies: 5
Views: 3090

Re: IRQ, EVENT and Srial Driver

i want start a event when on SD1 arrived data, i wired the pin tx and rx for simulate the arrive data on SD1, i write this code but when i start program the thread go in status WTANDEVT, and don't running, event_listener_t Uart1Data; static THD_WORKING_AREA(waRead5, 128); static THD_FUNCTION(Thread5...
by antoniolinux
Thu Oct 22, 2015 1:35 pm
Forum: STM32 Support
Topic: IRQ, EVENT and Srial Driver
Replies: 5
Views: 3090

Re: IRQ, EVENT and Serial Driver

hi rewrite all with event system but don't work...... I don't understand where is the error, static uint8_t bufferMsg[BUFFER_SIZE]; /* * Pointer to the UART handler thread. */ static THD_WORKING_AREA(waRead5, 128); static THD_FUNCTION(Thread5,arg) { chRegSetThreadName("th_Riempio_Buffer");...
by antoniolinux
Thu Oct 22, 2015 9:56 am
Forum: STM32 Support
Topic: IRQ, EVENT and Srial Driver
Replies: 5
Views: 3090

IRQ, EVENT and Srial Driver

hi to all i write this code #define EVT_UART_RX EVENT_MASK(0) #define EVT_UART_TX EVENT_MASK(1) #define EVT_UART_ERR EVENT_MASK(2) /* * Pointer to the UART handler thread. */ static const uint8_t errore[]="Error uart"; static const uint8_t dati[]="Dati uart"; static const uint8_t...
by antoniolinux
Wed Oct 14, 2015 2:11 pm
Forum: STM32 Support
Topic: Uart reset Status Bit
Replies: 2
Views: 1912

Re: Uart reset Status Bit

Giovanni thanks for your answer i fix it with

Code: Select all

USART1->SR

but where don't find [code]]UART_SR_ERRORS[/code

Antonio
by antoniolinux
Wed Oct 14, 2015 1:02 pm
Forum: STM32 Support
Topic: function Serial.attach()
Replies: 10
Views: 5471

Re: function Serial.attach()

hI AlSith my code is here: static THD_WORKING_AREA(waRead5, 128); static THD_FUNCTION(Thread5,arg) { chRegSetThreadName("th_Riempio_Buffer"); msg_t charbuf; // int count=0; // char B2[] = "E_2"; // char B3[] = "E_3"; uint8_t c; event_listener_t Uart1Data; eventmask_t fl...
by antoniolinux
Wed Oct 14, 2015 9:49 am
Forum: STM32 Support
Topic: Uart reset Status Bit
Replies: 2
Views: 1912

Uart reset Status Bit

Hi to all, in some example i have read the possibility to resetting status bits of UART,
i read

Code: Select all

UART u;
...
  u->SR = ~sr;


the function SR don't exist, in version 3.0 is change the name or others?
bye
A.

Go to advanced search