2017年6月11日 星期日

NANO100:Using data flash without the external 12M HZ crystal.

The data flash start address is set by register so it need a reset after update the address, but in default it will use  the external 12M HZ crystal.It's need to modify the CFOSC .



Modify the \SampleCode\StdDriver\FMC_RW set_data_flash_base() function



Ref:
     Nano100 Series Technical Reference Manual

NANO100:Enable printf use Nu-Link to send massage

1.Add #define DEBUG_ENABLE_SEMIHOST in Library\StdDriver\src\retarget.c .
 

2.Start Keil C IDE debug session and enable the View\Serial Windows\UART #1.


3. Now you can see the printf massage in Keil C IDE.

Ref:
   2. Semihosting

2017年6月7日 星期三

Octave: Modulation Sine Wave use PWM generate look up table for MCU DAC.

Input the target sample frequency ,sample bits and sample frequency.Generate the duty of PWM(percentage).
Code:
Avoid the negative part cause normally MCU didn't have negative voltage output ability.







Ref:
    1.http://bugworkshop.blogspot.tw/2011/04/blog-post_12.html

Linux driver: How to enable dynamic debug at booting time for built-in driver.

 Dynamic debug is useful for debug driver, and can be enable by: 1. Mount debug fs #>mount -t debugfs none /sys/kernel/debug 2. Enable dy...