Search found 374 matches

by faisal
Mon Oct 31, 2022 5:01 pm
Forum: ChibiOS/HAL
Topic: BaseFlash: Add erase_range
Replies: 2
Views: 1522

BaseFlash: Add erase_range

I need to be able to erase a range of flash. Currently the only way to do it at the application layer would be something like this: foreach sector: sector_range flashStartEraseSector(sector) flashWaitErase() Most flash devices have variable sector sizes for erase. The above operation would use the d...
by faisal
Mon Oct 31, 2022 4:42 pm
Forum: Small Change Requests
Topic: BaseFlash simulation driver
Replies: 2
Views: 2597

BaseFlash simulation driver

Here's a simulation driver for a BaseFlash. It uses a file on disk as the backing store. One cool feature is that it supports a memory mapped mode as well - caching the file in RAM, and using the base address of the cache as the .address in the flash_descriptor. Downside is that it allocates enough ...
by faisal
Mon Oct 17, 2022 5:25 pm
Forum: Small Change Requests
Topic: hal_lld should not assume pll is disabled
Replies: 2
Views: 1547

Re: hal_lld should not assume pll is disabled

Hi, The solution for this could be to not let the loaded application to re-initialize by setting STM32_NO_INIT at TRUE. Bootloader and application should have the same mcuconf.h settings, this way all the calculated macros would be the same. This also makes the boot a little faster and use less cod...
by faisal
Thu Oct 13, 2022 5:26 pm
Forum: Small Change Requests
Topic: Check for and expose maximum (DMA) transfer size Topic is solved
Replies: 1
Views: 1756

Check for and expose maximum (DMA) transfer size Topic is solved

STM32 hal_spi_lld has an assert which checks that the maximum transfer size is not violated (n < 65536). Other drivers that use DMA also have this limitation, but this condition is not being checked. Additionally, it would be useful to remove that magic number and instead expose that as a #define so...
by faisal
Tue Oct 11, 2022 6:29 pm
Forum: Small Change Requests
Topic: hal_lld should not assume pll is disabled
Replies: 2
Views: 1547

hal_lld should not assume pll is disabled

A software bootloader may configure the PLL before the ChibiOS application runs. hal_lld.c can deactivate the PLL in case it's already on, and then reactivate when it has configured it. Below is an example for the L4+ series: $ git diff HEAD~1 -- ChibiOS_20.x.x/os/hal/ports/STM32/STM32L4xx+/hal_lld....
by faisal
Fri Sep 09, 2022 1:38 pm
Forum: ChibiOS/RT
Topic: behaviour of chMBPostNN
Replies: 5
Views: 2172

Re: behaviour of chMBPostNN

One time I wanted to push a bunch of objects into the queue, and only after that allow the scheduler to switch threads (to avoid the context switch overhead). Otherwise if the consumer is higher priority, then everytime you push an object it will context switch. The trick was to use I-class APIs rel...
by faisal
Tue Aug 23, 2022 6:18 pm
Forum: ChibiOS/RT
Topic: Using a Mailbox increases thread callup timing
Replies: 4
Views: 1867

Re: Using a Mailbox increases thread callup timing

If you need a queue, you can probably get away without using a mutex if you have a power of 2 sized circular buffer and single producer single consumer design (and atomic word sized reads). That's faster than a chibi object fifo (mainly because of no mutex).
by faisal
Wed Jul 06, 2022 3:12 am
Forum: User Projects
Topic: my Engine Control Module
Replies: 57
Views: 51280

Re: my Engine Control Module

russian wrote:
Giovanni wrote:It requires some kind of adapter, right?


Absolutely. On Linux SocketCAN seems to be extremely supported with options in all price ranges.


We did several simulation drivers a while ago and used with much success, were you able to use any?

viewtopic.php?t=4861
by faisal
Fri Feb 04, 2022 5:03 am
Forum: Bug Reports
Topic: #1198 breaks compilation for all STM496 with less than 169 pins Topic is solved
Replies: 13
Views: 4542

Re: #1198 breaks compilation for all STM496 with less than 169 pins Topic is solved

Just tried the tool that comes with Visual Studio (not VSCode). Below is what it generated. Here is the guide I used: https://www.vishalon.net/blog/generate-sample-xml-data-from-xsd-using-visual-studio . I just noticed by doing this exercise, that you can define certain headers to be present in the ...
by faisal
Fri Feb 04, 2022 4:19 am
Forum: Bug Reports
Topic: #1198 breaks compilation for all STM496 with less than 169 pins Topic is solved
Replies: 13
Views: 4542

Re: #1198 breaks compilation for all STM496 with less than 169 pins Topic is solved

Hi Giovanni/Faisal, Issue is, these elements(GPIOI) are not defined in board.chcfg file. We can manually add this node, but wanted to know if there is a tool available to generate these chcfg files. How did you generate them in the first place? Thanks, AQ Many tools out there can do this apparently...

Go to advanced search