Search found 122 matches

by vrollei
Sat Oct 17, 2020 1:13 pm
Forum: Bug Reports
Topic: hal_st_lld.h - misprint in #if - #elif
Replies: 1
Views: 53

hal_st_lld.h - misprint in #if - #elif

Hi,

It seems there is misprint in os/hal/ports/STM32/LLD/TIMv1/hal_st_lld.h line 470 in #elif condition:

#elif OSAL_ST_MODE == OSAL_ST_MODE_FREERUNNING


should be:

#elif OSAL_ST_MODE == OSAL_ST_MODE_PERIODIC


ChibiOS 20.3.2
by vrollei
Sun Jul 14, 2019 4:02 pm
Forum: STM32 Support
Topic: USART timeout_cb
Replies: 9
Views: 728

Re: USART timeout_cb

one more thing:

Code: Select all

  chSemWait(rxtimeout_sem);
  chThdSleepMilliseconds(500);
  n = MODBUS_BUFFER_SIZE  - usartStopReceive(usartDriver);



whithout chThdSleepMilliseconds n will be 1

It seems I set wrong timeout value...
by vrollei
Sun Jul 14, 2019 3:45 pm
Forum: STM32 Support
Topic: USART timeout_cb
Replies: 9
Views: 728

Re: USART timeout_cb

size_t n = 1; if (usartReceiveTimeout(usartDriver, &n, buffer, TIME_MS2I(MODBUS_RX_TIMEOUT_MS)) == MSG_OK) { usartStartReceive(usartDriver, MODBUS_BUFFER_SIZE - 1, buffer + 1); chSemWait(rxtimeout_sem); n = MODBUS_BUFFER_SIZE - usartStopReceive(usartDriver); } else { RX_TIMEOUT; } Does usartSto...
by vrollei
Sun Jul 14, 2019 2:38 pm
Forum: STM32 Support
Topic: USART timeout_cb
Replies: 9
Views: 728

Re: USART timeout_cb

yes, I tried to implement it using rxchar_cb, vt and uartStartReceive with rx buffer size 256 bytes (it is maximum Modbus frame size). It would not work as I understand. rxchar_cb will not be called on char received. Right? EDIT: It is critical not to restart usart receive, otherwise there is chance...
by vrollei
Sun Jul 14, 2019 2:03 pm
Forum: STM32 Support
Topic: USART timeout_cb
Replies: 9
Views: 728

Re: USART timeout_cb

Is it possible to implement something like this:

1. Start receive
2. Wait first byte and if there is no one for some period T, then it is timeout.
3. If first byte received then use timeout_cb to determine end of frame.
by vrollei
Sun Jul 14, 2019 1:42 pm
Forum: STM32 Support
Topic: USART timeout_cb
Replies: 9
Views: 728

Re: USART timeout_cb

It works!
by vrollei
Sun Jul 14, 2019 1:36 pm
Forum: STM32 Support
Topic: USART timeout_cb
Replies: 9
Views: 728

USART timeout_cb

Hi,

I am trying to enable timeout_cb for Modbus communication timeout handling, but there is no call of timeout_cb

timeout_cb and timeout values are set in config
and RTOEN and RTOIE set to 1

How to enable timeout_cb?

Thanks!
by vrollei
Fri Jul 12, 2019 9:51 pm
Forum: ChibiStudio
Topic: Debug plugin with DSF support
Replies: 30
Views: 6388

Re: Debug plugin with DSF support

If you need any help with changes... let me know, it is not so complex.

I don not think that It would be easy to remove all code under Eclipse lic....
by vrollei
Thu Jul 11, 2019 3:37 pm
Forum: ChibiStudio
Topic: Debug plugin with DSF support
Replies: 30
Views: 6388

Re: Debug plugin with DSF support

Hi,

there were no updates.
I have switched to VSCode and think it would be great to make extension for VSCode....
by vrollei
Wed Jun 05, 2019 4:40 pm
Forum: ChibiOS/HAL
Topic: hal_st_lld override implementation
Replies: 4
Views: 496

Re: hal_st_lld override implementation

Hi,

with modified make file it would be difficult to change project config: change ST timer....

Is it possible to use STM32_ST_USE_TIMER == 0 macro to switch between implementations?

Or maybe you can add ST based on RTC implementation to STM32 hal_st_lld?

Go to advanced search