Search found 121 matches

by wurstnase
Thu Jan 23, 2020 10:15 am
Forum: ChibiOS/RT
Topic: HardFault on chRescheduleAhead
Replies: 4
Views: 822

HardFault on chRescheduleAhead

Hi, i've got a hardfault while testing my code. Unfortunately this was a tool in normal use, where I'm not able to get the complete backtrace nor a debugger on it. The only information I've had: The SP was at 0x200003E0. R0 at 0x0801EA4B which is chRescheduleAhead when I'm looking in the map file. A...
by wurstnase
Tue Jan 21, 2020 2:41 pm
Forum: Bug Reports
Topic: UIF not cleared after #1067 Topic is solved
Replies: 2
Views: 931

Re: UIF not cleared after #1067 Topic is solved

My patch look like this: diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.c b/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.c index b9e0a3756..88b7632ea 100644 --- a/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.c +++ b/os/hal/ports/STM32/LLD/TIMv1/hal_gpt_lld.c @@ -1127,6 +1127,7 @@ void gpt_lld_serve_i...
by wurstnase
Tue Jan 21, 2020 2:12 pm
Forum: Bug Reports
Topic: UIF not cleared after #1067 Topic is solved
Replies: 2
Views: 931

UIF not cleared after #1067 Topic is solved

Hi, shouldn't be the UIF cleared in the interrupt? The patch will remove the gptp->tim->SR = 0; I think at least we need a gptp->tim->SR &= ~STM32_TIM_SR_UIF; @@ -1122,13 +1122,13 @@ void gpt_lld_polled_delay(GPTDriver *gptp, gptcnt_t interval) { * @notapi */ void gpt_lld_serve_interrupt(GPTDriv...
by wurstnase
Thu Jan 16, 2020 8:17 am
Forum: Bug Reports
Topic: I2C fallback Topic is solved
Replies: 1
Views: 394

I2C fallback Topic is solved

Hi, I've posted this before , but maybe it's a better idea to open a new bug report. With reverting the bug #1060, the I2C fallback hang, when timeout is INFINITE. My suggestion look like this: diff --git a/os/hal/lib/fallback/I2C/hal_i2c_lld.c b/os/hal/lib/fallback/I2C/hal_i2c_lld.c index f324333dc...
by wurstnase
Mon Jan 13, 2020 3:28 pm
Forum: Bug Reports
Topic: chTimeIsInRangeX always false? Topic is solved
Replies: 15
Views: 4417

Re: chTimeIsInRangeX always false? Topic is solved

The I2C fallback needs now some rework again. Something like this: diff --git a/os/hal/lib/fallback/I2C/hal_i2c_lld.c b/os/hal/lib/fallback/I2C/hal_i2c_lld.c index f324333dc..e3e3ec86f 100644 --- a/os/hal/lib/fallback/I2C/hal_i2c_lld.c +++ b/os/hal/lib/fallback/I2C/hal_i2c_lld.c @@ -94,6 +94,9 @@ st...
by wurstnase
Fri Dec 13, 2019 12:32 pm
Forum: Small Change Requests
Topic: CH_DBG_FILL_THREADS should fill the main stack Topic is solved
Replies: 1
Views: 2329

CH_DBG_FILL_THREADS should fill the main stack Topic is solved

Hi,

currently only CH_DBG_ENABLE_STACK_CHECK will fill the main-stack.
Also

Code: Select all

static inline stkalign_t *chThdGetWorkingAreaX(thread_t *tp)
should be available with CH_DBG_FILL_THREADS.
by wurstnase
Tue Dec 10, 2019 2:18 pm
Forum: ChibiOS/RT
Topic: I2c Communication in chibios
Replies: 3
Views: 934

Re: I2c Communication in chibios

There is no easy way to have a generic version for this. Some slave needs an address with 8bit, some with 16bit. Some are MSB others LSB. You could use a struct for your purpose. struct my_data { uint8_t address; uint8_t data[SENDING_BUFFER_SIZE]; } __attribute__((packed)); void i2c_write(uint8_t ad...
by wurstnase
Fri Dec 06, 2019 1:59 pm
Forum: ChibiOS/HAL
Topic: Abstract File Stream
Replies: 7
Views: 1046

Re: Abstract File Stream

Mmmm... So the file object is the FatFS-FIL and the fileStreamObject? Finally I could then write something like this: FileObject *fo; FFObject ffo; ffObjectInit(&ffo); ffOpenFile(&ffo, fo, "my_file", FA_WRITE); chprintf((BaseSequentialStream *)fo, "hello world"); I still ...
by wurstnase
Fri Dec 06, 2019 9:28 am
Forum: ChibiOS/HAL
Topic: Abstract File Stream
Replies: 7
Views: 1046

Re: Abstract File Stream

The object would be a wrapper around a file handle and implements the file stream interface. Ok, something like this I think? #define _file_object_data \ _file_stream_data; \ FIL *file; #define _file_object_methods \ _file_stream_methods; \ msg_t (*open)(void *instance, const char *f_name, uint8_t ...
by wurstnase
Thu Dec 05, 2019 4:12 pm
Forum: ChibiOS/HAL
Topic: Abstract File Stream
Replies: 7
Views: 1046

Re: Abstract File Stream

Ok, so I should always create a new object which inherit the abstract class?

In my case an object which has the methods (vmt) from the file stream, appended by a FIL-object. Then a objectInit (open) function?!

Go to advanced search