Search found 33 matches

by wgreiman
Mon Jan 16, 2017 9:43 pm
Forum: ChibiOS/NIL
Topic: New Arduino Port of NIL Topic is solved
Replies: 1
Views: 24406

New Arduino Port of NIL Topic is solved

This is mainly a thank-you to Giovanni. I decided to update my old Arduino port of NIL. An Arduino AVR library based on a recent trunk download is here . I is very small. Here is a minimal NIL blink on ATmega328P Uno: // compare sizes - MinBlinkArduino vs MinBlinkChNil #include "ChNil.h" /...
by wgreiman
Tue Jan 10, 2017 8:01 pm
Forum: Bug Reports
Topic: Incorrect return from chSchGoSleepTimeoutS() Topic is solved
Replies: 5
Views: 4429

Re: Incorrect return from chSchGoSleepTimeoutS() Topic is solved

Giovanni, Thanks for all the help. The new avr-gcc compiler is causing me grief in a lot of my open source software. I tried adding ":::"memory" to an existing statement earlier and it failed. I didn't try adding "noinline" since I like the macro idea. I defined this macro i...
by wgreiman
Tue Jan 10, 2017 6:54 pm
Forum: Bug Reports
Topic: Incorrect return from chSchGoSleepTimeoutS() Topic is solved
Replies: 5
Views: 4429

Re: Incorrect return from chSchGoSleepTimeoutS() Topic is solved

I tried putting this line in port_switch() with no improvement. I tied at the beginning and just befor the "ret" asm volatile ("" : : : "memory"); If I put it between the port_switch() call and the return, like this, it works. The program actually uses two bytes less fl...
by wgreiman
Tue Jan 10, 2017 6:13 pm
Forum: Bug Reports
Topic: Incorrect return from chSchGoSleepTimeoutS() Topic is solved
Replies: 5
Views: 4429

Incorrect return from chSchGoSleepTimeoutS() Topic is solved

recently the avr-gcc compiler used by Arduino was change and now chSchGoSleepTimeoutS() returns the wrong status for an old version of nil. I found the problem and checked for a fix in the latest version of nil. It appears it would have the same problem. At line 680 of ch.c, trunk 10022, the wrong v...
by wgreiman
Fri Jul 15, 2016 8:05 pm
Forum: User Projects
Topic: 1,000,000 Sample/Sec ADC Logger
Replies: 5
Views: 5045

Re: 1,000,000 Sample/Sec ADC Logger

I did a first cut of keeping state in the SD SPI driver so I can use the max number of multi-block transfers. The improvement was astounding. This loop in my file system test program had a factor of ten speedup for 512 byte writes! for (i = 0; i < n; i++) { chTMStartMeasurementX(&tm_sd); if (fil...
by wgreiman
Fri Jul 15, 2016 1:30 pm
Forum: User Projects
Topic: 1,000,000 Sample/Sec ADC Logger
Replies: 5
Views: 5045

Re: 1,000,000 Sample/Sec ADC Logger

The MMC-SPI driver would probably work OK but I use versions of my SD SPI driver in many systems like Particle.io boards which are based on STM32F2 with WI-FI or Cellular. It is cleaner for me to interface at the SPI level. I am experimenting with the idea of presenting a simple block read/write int...
by wgreiman
Thu Jul 14, 2016 10:38 pm
Forum: User Projects
Topic: 1,000,000 Sample/Sec ADC Logger
Replies: 5
Views: 5045

Re: 1,000,000 Sample/Sec ADC Logger

I am not using FatFS. I am using a totally rewritten version of a FAT library I wrote many years ago for Arduino. I only use the file API to to create a large, up to 4 GB, contiguous file. I then write the file as a single multi-block write. I issue a single CMD25, WRITE_MULTIPLE_BLOCK, then write t...
by wgreiman
Thu Jul 14, 2016 7:48 pm
Forum: User Projects
Topic: 1,000,000 Sample/Sec ADC Logger
Replies: 5
Views: 5045

1,000,000 Sample/Sec ADC Logger

I have been testing a version of my SdFat library on ChibiOS. If there is interest, I will post a preview version of the data logger. Here is data from a test using a NUCLEO-F411RE. million.png Notice, one data point every microsecond. I use TIM3 to trigger ADC1 a million times per second. I capture...
by wgreiman
Thu Jul 14, 2016 1:29 pm
Forum: Bug Reports
Topic: SDIO patch required for STM32F446xx Topic is solved
Replies: 2
Views: 3242

SDIO patch required for STM32F446xx Topic is solved

SDIO for STM32F446 will not compile due to this change from previous STM32F4 chips. From AN4658 - Application note for STM32F446 line CE-ATA protocol related features removed from specification (updated SDIO_STA, SDIO_ICR and SDIO_CMD registers) The following status bits were removed from the SDIO_S...
by wgreiman
Wed Jul 13, 2016 9:12 pm
Forum: STM32 Support
Topic: Incorrect SDMMC defines for STM32L4xx chips
Replies: 4
Views: 2661

Incorrect SDMMC defines for STM32L4xx chips

SDMMC_DCTRL_DBLOCKSIZE_2 and SDMMC_DCTRL_DBLOCKSIZE_3 are incorrect in a number of files. #define SDMMC_DCTRL_DBLOCKSIZE_2 (0x3U << SDMMC_DCTRL_DBLOCKSIZE_Pos) /*!< 0x00000040 */ #define SDMMC_DCTRL_DBLOCKSIZE_3 (0x4U << SDMMC_DCTRL_DBLOCKSIZE_Pos) /*!< 0x00000080 */ Should be: #define SDMMC_DCTRL_D...

Go to advanced search