Search found 16 matches

by fpga_comp
Tue Aug 11, 2015 11:58 pm
Forum: Kinetis Support
Topic: Flash security .cfmconfig block optimized away by RVCT
Replies: 9
Views: 8669

Re: Flash security .cfmconfig block optimized away by RVCT

I don't know whether the existing code works correctly for IAR compiler, so I only change the behavior specifically for RVCT. This uses the section ".ARM.__at_0x400" for RVCT and now the block is preserved and at the right location. #ifdef __CC_ARM __attribute__ ((section(".ARM.__at_0...
by fpga_comp
Tue Aug 11, 2015 4:47 pm
Forum: Kinetis Support
Topic: Flash security .cfmconfig block optimized away by RVCT
Replies: 9
Views: 8669

Flash security .cfmconfig block optimized away by RVCT

I am trying to compile ChibiOS 3.0.0 stable release on RVCT compiler V 5.05 update 1 (build 106). I have bricked a Teensy LC (Kinetis KL26) already because the security block inside hal_lld.c has optimized away by the C compiler. i.e. the security location was overwritten by other pieces of code and...
by fpga_comp
Sat Nov 01, 2014 4:13 am
Forum: Kinetis Support
Topic: Kinetis KL25Z Freedom Board - CM0+
Replies: 10
Views: 12246

Re: Kinetis KL25Z Freedom Board - CM0+

There is also the option of installing CMSIS-DAP firmware directly on the board and using OpenOCD (GDB Server) for debugging.

"How to debug Freedom Board (FRDM-KL25Z) using OpenOCD"
http://acassis.wordpress.com/2013/03/22 ... g-openocd/
by fpga_comp
Tue Oct 14, 2014 8:00 pm
Forum: Kinetis Support
Topic: Kinetis KL25Z Freedom Board - CM0+
Replies: 10
Views: 12246

Re: Kinetis KL25Z Freedom Board - CM0+

Don't know if this replacement debugger firmware would work for the new boards. There are restrictions on how it is used. https://www.segger.com/opensda.html OpenSDA / OpenSDA V2 firmware SEGGER offers a firmware running on the Freescale OpenSDA platform which makes OpenSDA compatible to J-Link Lite...
by fpga_comp
Tue Sep 23, 2014 11:09 pm
Forum: Kinetis Support
Topic: SPI driver for KINETIS K20.
Replies: 35
Views: 23981

Re: SPI driver for KINETIS K20.

The MMC/SPI driver communicates with the card at the discovery stage for its capability at a slower rate (< 400kbps) and then it get switched to a faster speed (25Mbps) for the actual data transfer. I notice that the SPI tar0 init code is inside the "if (spip->state == SPI_STOP)" branch. I...
by fpga_comp
Tue Sep 23, 2014 4:35 pm
Forum: Kinetis Support
Topic: SPI driver for KINETIS K20.
Replies: 35
Views: 23981

Re: SPI driver for KINETIS K20.

I got the old STM32F103 fatfs demo code compiled and I am testing on my FPGA eval board. ​mmcConnect() failed as the MicroSD card didn't power up. Here is what I see in ​mmcConnect(). It uses spi_lld_ignore() to send 128 clock pulses. https://static.hackaday.io/images/5634721411483804958.gif /* Use ...
by fpga_comp
Mon Sep 22, 2014 1:52 pm
Forum: Kinetis Support
Topic: SPI driver for KINETIS K20.
Replies: 35
Views: 23981

Re: SPI driver for KINETIS K20.

Thanks. So it would be something that looks like this.

Code: Select all

// can't allocate DMA channels!?
   chDbgAssert((SPID1.DMA_Rx==DMA_NONE_AVAIL)||
               (SPID1.DMA_Tx==DMA_NONE_AVAIL),"No DMA Ch.");
by fpga_comp
Mon Sep 22, 2014 12:58 am
Forum: Kinetis Support
Topic: SPI driver for KINETIS K20.
Replies: 35
Views: 23981

Re: SPI driver for KINETIS K20.

Oops. Using the Tx DMA is why my code was acting up! So much for that idea. I am going to try something else and if that fails, I'll use Rx DMA. Basically because there is Tx FIFO in the SPI. Once it is filled, Tx DMA thinks it is done when the SPI is still sending data. That messed up the timing of...
by fpga_comp
Sun Sep 21, 2014 10:54 pm
Forum: Kinetis Support
Topic: SPI driver for KINETIS K20.
Replies: 35
Views: 23981

Re: SPI driver for KINETIS K20.

One thing I notice is that your DMA SPI code would always turn on Rx DMA. I use the Tx DMA for interrupt as it is always active driving the transfer. I only enable the Rx DMA when it is expecting to receive data to save memory bandwidth. Good job for the 16-bit transfer! I am using on a K22 on my ow...
by fpga_comp
Sun Sep 21, 2014 10:04 pm
Forum: Kinetis Support
Topic: SPI driver for KINETIS K20.
Replies: 35
Views: 23981

Re: SPI driver for KINETIS K20.

I got most of my own code (based on STM32F4 SPI and dmaspi) working today, but having issues with _spi_wait_s(spip) in spiSend() not suspend. I guess you have beaten me to it. Good job! I'll go download your working code and save myself the headaches. :) I have attached my dma.c & dma.h which ma...

Go to advanced search