顯示具有 MEMO 標籤的文章。 顯示所有文章
顯示具有 MEMO 標籤的文章。 顯示所有文章

2021年4月18日 星期日

[MEMO] How to install unofficially supported protocols on Saleae

最近因為Flash缺料的問題, 所以經常會被代工廠要求希望能新增Second Source的支援, 因此照三餐在研究Flash Driver和Datasheet便成了家常便飯一樣.

由於Flash command相當的多, 因此每次都要開著Datasheet來對照logic analyzer上面的波形目前是在執行什麼command(如下圖)的話, 還挺麻煩的.

2021年3月20日 星期六

[MEMO] fix build error for GetCurrentInterruptNumber function from gcc to armcc

 最近要移植一些gcc的程式到Keil-MDK上, 其中有一個GetCurrentInterruptNumber的程式無法編譯成功, 會有以下的錯誤產生.

error:  #18: expected a ")"




所以我們必須把它改成armcc可以支援的方式, 如下所示:



2021年3月6日 星期六

[MEMO] How to fix build error: too many positional arguments" on Keil-MDK 5.30 and later

 1. 最近在study NXP LPC5528 MCU, 發現從官網上抓下來的example code在編譯的時候, 會出現error: too many positional arguments.

2021年2月25日 星期四

[MEMO] How to enable RTT on Embitz IDE

If you want to enable the RTT function on Embitz, in addition to adding RTT-related .c & .h, we also need to add some commend on Embitz IDE for normal operation.

1. Go to Debug/Interfaces like below:



2. Add the following commands under GDB additionals/After connect:

eval "monitor exec SetRTTAddr %p", &_SEGGER_RTT

3. Done

2020年2月10日 星期一

[MEMO] How to check total RAM and ROM size on Keil-MDK

1. ZI Data: Zero Initialized Data
2. RO Data are the constants
3. Total RAM Size = RW Data + ZI Data
4. Total ROM Size = Code + RO Data + RW Data

[MEMO] How to install nrfutil for the nRF52 platform

1. Download and install python 2.7.15.


2. Open cmd.
3. Go to C:\Python27\Scripts\
4. Type command in console.
    pip install nrfutil==3.4.0

5. Done.


2018年4月29日 星期日

[nRF52840] How to change output voltage from 1.8v to 3.3v?

    nRF52840可以根據設定來改變自身的輸出電壓, 底下的程式可以先加在程式一開始的階段來改變設定.


        if (NRF_UICR->REGOUT0 != UICR_REGOUT0_VOUT_3V3) 
        {
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
            NRF_UICR->REGOUT0 = UICR_REGOUT0_VOUT_3V3;

            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
        }
        NRF_USBD->ENABLE = 1;

[nRF52840] How to Disable nfc and set P0.09 and P0.10 to normal GPIO?

    前陣子使用的板子上, 剛好使用P0.09來當作開關, 結果發現一直不能正常動作, 查了一下才知道, 剛好P0.09和P0.10是預設在nfc的功能, 因此如果要把這2隻GPIO拿來當作一般GPIO使用的話, 必須在程式的宣告上加上以下這一段程式, 把nfc先Disable後, 才能正常使用. 


const uint32_t UICR_ADDR_0x20C    __attribute__((at(0x1000120C)))  __attribute__((used)) = 0xFFFFFFFE; //set nfc disable