For all models of N32G430 microcontroller series, the existence and number of a peripheral, please refer to the data sheet of the corresponding model. Nations Technologies Inc. 28 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Atomic accesses can be made through the bit-band Alias to performed read-modify-write operations on the target bits of the bit-band region. The specific mapping is as follows: Nations Technologies Inc. 30 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 33
Both the peripheral registers and SRAM are mapped into a bit-band area, which allows a single bit-band area write and read operation to be performed. Nations Technologies Inc. 33 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
System memory can be accessed in two address areas, 0x0000_0000 or 0x1FFF_0000 (ICode/DCode/DMA); Boot from the built-in SRAM: The built-in SRAM is mapped to boot space (0x0000_0000); Nations Technologies Inc. 34 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
FLASH specification Flash consists of a main storage area and an information area, which are described separately below: Nations Technologies Inc. 35 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
USART1 serial interface to program the flash memory. System configuration area, which contains basic information of the chip. Nations Technologies Inc. 36 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 37
Set the FLASH_CTRL.PER bit to' 1'; Select the page to be erased with the FLASH_ADD register; Nations Technologies Inc. 37 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 38
Check the FLASH_ STS.BUSY bit to confirm that there are no other flash operations in progress; Unlock the FLASH_CTRL.OPTWE bit; Nations Technologies Inc. 38 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 39
0xFF. When the option byte and its complement are both 0xFF (the state after erasing), the above verification steps are skipped and verification is not required. Nations Technologies Inc. 39 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
0:Reset occurs when entering stop0/stop2 mode 1:No reset occurs when entering stop0/stop2 mode USER[0]:WDG_SW configuration options, read through FLASH_OB [2] Nations Technologies Inc. 40 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 41
Read protection is set by configuring RDP bytes in the option byte block. Three different read protection levels can be configured, as shown in the following Table Nations Technologies Inc. 41 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
RDP value 0xA5) will be reloaded into the system, and the read protection will be released; The following access operations to the flash memory will be prohibited: Nations Technologies Inc. 42 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
CPU will be able to work at a higher frequency. When the instruction requested by the CPU is in the Nations Technologies Inc. 47 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 48
The iCache is designed as instruction cache. When the instruction is updated by application software or the instruction Nations Technologies Inc. 48 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
I/D/S/DMA can be accessed. I/D BUS can run programs at full speed from Remap to SRAM. Nations Technologies Inc. 49 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
FLASH_CAHR 030h Reserved Reset Value FLASH control and status register See for abbreviations in register descriptions 1.1 section. Nations Technologies Inc. 50 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 51
011: three cycle delay, when 96MHz < HCLK Other values: reserved 2.2.4.2.2 The FLASH key register (FLASH_KEY) Address offset: 0x04 Reset value: 0x0000 0000 Nations Technologies Inc. 51 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 52
'1', and writing '1' can clear this bit. Reserved Reserved, the reset value must be maintained. PGERR Programming error Nations Technologies Inc. 52 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 53
After detecting the correct unlocking sequence, hardware clears this bit to '0'. After an unsuccessful unlocking operation, this bit cannot be changed until the Nations Technologies Inc. 53 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 54
Note: When the FLASH_STS.BUSY bit is '1', this register cannot be written. 2.2.4.2.7 The FLASH Option byte register 2 (FLASH_OB2) Address offset: 0x18 Reset value: 0x0c800000 Nations Technologies Inc. 54 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 55
Not used (if these bits are written in the Flash option byte, they will be read in this register with no effect on the device.) IWDGSLEEPFRZ IWDG to freeze in sleep mode Nations Technologies Inc. 55 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 56
When this bit is '1', it means that the option byte does not match its complement. Note: This bit is read-only. 2.2.4.2.9 Write protection register (FLASH_WRP) Address offset: 0x20 Reset value: 0x0000 FFFF Nations Technologies Inc. 56 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
STOP2 mode: Turn off MR and switch to BKR power supply to save register and SRAM contents. Nations Technologies Inc. 58 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Refer to the electrical characteristics section of the data sheet for details on power-on and power-off resets. Nations Technologies Inc. 59 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The CPU stops and all peripherals including peripherals around the Cortex®-M4 core (such as NVIC, SysTick, etc.) can run and wake up the CPU when an interrupt or event occurs. Nations Technologies Inc. 63 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Independent Watchdog (IWDG) optional: Once enabled, it will keep counting until a reset is generated. RTC optional: It can be turned on by RCC_BDCTRL.RTCEN. Nations Technologies Inc. 64 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
HSI RC oscillator is set as the system clock when STOP2 mode is waken up by an interrupt or wake-up event. The codes will resume execution after STOP2 wakeup from where it stopped. Peripheral initialization is needed after Nations Technologies Inc. 65 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
After waking up from STANDBY mode, code execution is same as power on (boot pin is detected, reset vector initialization, etc.). PWR_CTRLSTS.STBYF flag indicates that MCU exits from STANDBY mode. Nations Technologies Inc. 66 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Clear PA8 wakeup flag. This bit is always read as 0. 0: No effect 1: Clear the wakeup flag after 2 System clock cycles. Nations Technologies Inc. 67 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 68
0: No effect. 1: Clear the STANDBY.STBYF Flag . Reserved Reserved, the reset value must be maintained. Power down deep-sleep. Nations Technologies Inc. 68 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 70
Hardware will set this bit. it can be cleared by hardware, by a system reset or by setting PWR_CTRL.CLRWKUP1. 0: No wakeup event occurred 1: A wakeup event was received from the WKUP pin Nations Technologies Inc. 70 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
1: SRAM is in retention in STANDBY mode. Reserved Reserved, the reset value must be maintained. STOP2S STOP2 sleep mode control. 0: No-effect Nations Technologies Inc. 71 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 72
Bit field Name Description 1: Chip is set to be in STOP2 mode. Nations Technologies Inc. 72 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
FCLK is the free-running clock of Cortex™-M4F. For more details, refer to the ARM Cortex™-M4 technical reference manual. Nations Technologies Inc. 75 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The high-speed external clock signal (HSE) can be generated from the following two clock sources: HSE external crystal/ceramic resonator HSE user external clock Nations Technologies Inc. 76 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
If the HSE crystal oscillator fails, the HSI clock can be used as a backup source. Refer to section 4.3.8 Clock security system (CLKSS). Nations Technologies Inc. 77 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
HSE. The software can obtain the accurate RTC clock base by adjusting the prescaler of the RTC, and obtain the accurate independent watchdog (IWDG) timeout time by Nations Technologies Inc. 78 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
LSE fault. When LSE and LSI are enabled and ready, the RCC_BDCTRL.LSECLKSSEN bit must be enabled after configuring the RCC_BDCTRL.RTCSEL to select the RTC clock source. Nations Technologies Inc. 79 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
This bit cannot be cleared when PLL is used as the system clock. 0: Disable PLL 1: Enable PLL Nations Technologies Inc. 82 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 83
HSI oscillator. This bit cannot be reset if the HSI is used directly or indirectly as system clock. 0: Disable HSI oscillator 1: Enable HSI oscillator Nations Technologies Inc. 83 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When the system clock is output to the MCO pin, it should be ensured that the output clock frequency does not exceed the maximum frequency of the I/O Nations Technologies Inc. 84 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 85
Set and cleared by software to divide HSE before PLL entry. This bit can only be written when PLL is disabled. 0: HSE clock not divided Nations Technologies Inc. 85 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 86
01: HSE oscillator used as system clock 10: PLL used as system clock 11: Not applicable SCLKSW[1:0] System clock switch Nations Technologies Inc. 86 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Set by the software to clear the CLKSSIF flag. 0: No effect 1: Clear the CLKSSIF flag 22:21 Reserved Reserved, the reset value must be maintained. Nations Technologies Inc. 87 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 88
Set and cleared by software to enable and disable LSI ready interrupt. 0: Disable LSI ready interrupt 1: Enable LSI ready interrupt CLKSSIF Clock security system interrupt flag Nations Technologies Inc. 88 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Set and cleared by software. 0: Clear the reset 1: Reset window watchdog 10:7 Reserved Reserved, the reset value must be maintained. Nations Technologies Inc. 91 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Reserved Reserved, the reset value must be maintained. ADCEN ADC interface clock enable Set and cleared by software. Nations Technologies Inc. 92 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 93
Reserved, the reset value must be maintained. DMAEN DMA clock enable Set and cleared by software. 0: DMA clock disabled 1: DMA clock enabled Nations Technologies Inc. 93 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In debug mode, set and cleared by software to bypass oscillator. This bit can only be written when the external low-speed oscillator is disabled. Nations Technologies Inc. 97 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
0: Clear the reset 1: Reset IO Port A Block Reserved Reserved, the reset value must be maintained. Nations Technologies Inc. 100 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Reserved, the reset value must be maintained. LPTIMERRST LPTIMER reset Set and cleared by software. 0: Clear the reset 1: Reset LPTIMER Nations Technologies Inc. 102 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In this way, there is no risk of an IRQ occurring between the read and the modify access. Nations Technologies Inc. 105 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
OPEN DRAIN Disabled Disabled resistance of GPIO data is "0", when "1" high resistance of GPIO when "1" Nations Technologies Inc. 107 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In open drain mode, the I/O state can be obtained by reading the input data register. In push-pull mode, the read access to the output data register gets the last written value. Nations Technologies Inc. 109 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
'1' is set or cleared accordingly, and the bit not written with '1' will not be changed. The software does not need to disable interrupts, and is completed in a single AHB write operation. Nations Technologies Inc. 111 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
GPIO PC14 and PC15 can be used as GPIO, LSE oscillator pins and timestamp input. PC13 can be used as GPIO, tamper input, timestamp input, RTC output and standby wakeup source. Nations Technologies Inc. 113 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
To avoid any uncontrolled I/O levels, the device embeds internal pull-ups and pull-downs on the JTAG input pins: Nations Technologies Inc. 114 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
If the lock sequence operation is wrong, then it must be redone (w1-> w0-> w1-> r0) to initiate the lock operation again. Nations Technologies Inc. 126 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
These bits are write-only and can be accessed in word mode only. 0: Does not affect the corresponding PODy bit 1: Clear the corresponding PODy bit to 0 Nations Technologies Inc. 138 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
For Port D, only PLOCKK, PLOCK0, PLOCK12, PLOCK13, PLOCK14 and PLOCK15 bit fields are defined, other fields are reserved. Nations Technologies Inc. 139 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Reset value : 0x00000000 Bit field Name Description 31:30 Reserved Reserved, the reset value must be maintained. 29:24 EXTI7[5:0] EXTI7 configuration Nations Technologies Inc. 151 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In addition, by writing '1' in the software interrupt/event register, an interrupt/event request can also be generated by Nations Technologies Inc. 182 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 183
Configure 24 interrupt/event line mask bits (EXTI_IMASK,EXTI_EMASK); Configure the request bit of the software interrupt event register (EXTI_SWIE). Nations Technologies Inc. 183 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Write '1' in this bit to clear it, or change the polarity of edge detection to clear this bit. RTC Timestamp Selection Register(EXTI_TS_SEL) Address offset : 0x18 Reset value : 0x00000000 Nations Technologies Inc. 188 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 189
1: select EXTI1 as the trigger source of timestamp event; …… 15: Select EXTI15 as the trigger source of timestamp events. Nations Technologies Inc. 189 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Calculate the number of outstanding operations, perform a decrement operation of the DMA_TXNUMx register, Nations Technologies Inc. 191 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
0x2 / 00B1 0x2 / B2 3: R B2 [7:0] @0x2, W 00B2 [15:0] @0x4 0x4 / 00B2 Nations Technologies Inc. 192 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 193
0 to make it 16 bits and become 0x0055, then duplicate it to 32-bit data 0x0055_0055 and provide to HWDATA[31:0]; (if destination size is 32-bit then DMA will only pad source data with 0). Nations Technologies Inc. 193 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
If the user wants to turn off the circular mode, the user needs to write 0 to DMA_CHCFGx.CHEN to disable the DMA channel, and then write 0 to DMA_CHCFGx.CIRC (when DMA_CHCFGx.CHEN is 1, other bits in the Nations Technologies Inc. 195 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Address offset: 0x00 Reset value: 0x0000 0000 Bit field Name Description Transfer error flag for channel x (x=1…8). 31/27/23/19/15/11/7/3 ERRFx Nations Technologies Inc. 200 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Clear transfer complete flag for channel x (x=1…8). 29/25/21/17/13/9/5/1 CTXCFx Software can set this bit to clear TXCF of corresponding channel. Nations Technologies Inc. 201 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Reset value: 0x0000 0000 This register can only be written if the channel is disabled (DMA_CHCFGx.CHEN = 0). Nations Technologies Inc. 204 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The verification initial value can be configured, and the size end of the data to be verified can be configured. Support 8bit LRC check value generation The following figure is the block diagram of CRC unit. Nations Technologies Inc. 207 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
If the initial value needs to be set, the LRC register should be configured first. Nations Technologies Inc. 208 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The written data is the CRC value to be checked. The read data is the CRC calculation result. Only 32- bit operations are supported. CRC32 independent data register (CRC_CRC32IDAT) Address offset: 0x04 Reset value: 0x0000 0000 Nations Technologies Inc. 209 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
It can reset CRC module and set data register to be 0xFFFF_FFFF. This reset can only write 1, and hardware will clear to 0 automatically. CRC16 control register (CRC_CRC16CTRL) Address offset: 0x0C Reset value: 0x0000 0000 Nations Technologies Inc. 210 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Address offset: 0x14 Reset value: 0x0000 0000 Bit field Name Description 31:16 Reserved Reserved, the reset value must be maintained. Nations Technologies Inc. 211 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
CRC_CRC16DAT will be XOR with CRC_LCR register value. The result will be stored in CRC_LRC. Software read the result. It should be cleared before next use. Nations Technologies Inc. 212 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Incremental (quadrature) encoder interface: used for tracking motion and resolving rotation direction and position; Hall sensor interface: used to do three-phase motor control; Nations Technologies Inc. 213 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The event Interrupt and DMA output The capture channel 1 input can come from IOM or comparator output Nations Technologies Inc. 214 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
TIMx_CTRL1.UPDIS=0. The counter CK_CNT is valid only when the TIMx_CTRL1.CNTEN bit is set. The counter starts counting one clock cycle after the TIMx_CTRL1.CNTEN bit is set. Nations Technologies Inc. 215 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In this mode, the TIMx_CTRL1.DIR direction bits have no effect and the count direction is updated and specified by Nations Technologies Inc. 219 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Center-aligned asymmetric mode is only for TIM1. In center-aligned asymmetric mode(TIMx_CTRL1. ASYMMETRIC is 1 and TIMx_CTRL1.CAMSEL[1:0] is non- Nations Technologies Inc. 221 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 222
In this case, the counter restarts from 0, as does the prescaler's counter. Please note: if the update source is a counter overflow, auto-reload update before reloading the counter. Nations Technologies Inc. 222 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
ADC only when MMSEL3 = 1. If TIMx_CTRL1.CMODE[1:0]=00 in CCDATx(x=4,7,8,9), the CCDAT value of CCDATx will only trigger ADC when DIR =0. Nations Technologies Inc. 223 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Trigger ADC to sample 4 times If TIMx_CTRL1.CMODE[1:0]=01 in CCDATx(x=4,7,8,9), the CCDAT/CCDDAT value of CCDATx will only trigger ADC when DIR =1. Nations Technologies Inc. 224 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Trigger ADC to sample 4 times If TIMx_CTRL1.CMODE[1:0]=1x in CCDATx(x=4,7,8,9), the CCDAT/CCDDAT value of CCDATx will trigger ADC when DIR =0 or DIR=1. Nations Technologies Inc. 225 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Repetition counters feature automatic reloading. The update event ( generated by setting TIMx_EVTGEN.UDGN or hardware through slave mode controller) occurs immediately, regardless of the value of the repeat counter. Nations Technologies Inc. 226 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
1 ' by soft, the clock source of the prescaler is provided by the internal clock CK_INT. Nations Technologies Inc. 228 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
This mode is selected by configuring TIMx_SMCTRL.SMSEL=111. The counter can be configured to count on the rising or falling edge of the clock at the selected input. Nations Technologies Inc. 229 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The following figure is a schematic diagram of the external trigger input module in External clock source mode 2 Nations Technologies Inc. 230 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The output part generates an intermediate waveform OCxRef (active high) as reference. The polarity acts at the end of the chain. Nations Technologies Inc. 232 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In capture mode, the TIMx_CCDATx registers are used to latch the counter value after the ICx signal detects. There is a capture interrupt flag TIMx_STS.CCxITF, which can issue an interrupt or DMA request if the Nations Technologies Inc. 234 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Configure TIMx_CCEN.CC1P equal to ‘0’ to select the active polarity of filtered timer input 1(TI1FP1), valid on the rising edge. Configure TIMx_CCMOD1.CC2SEL equal to ‘10’ select TI1 as valid input for TIMx_CCDAT2. Nations Technologies Inc. 235 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
OCxREF. And the flag still can be set. Therefore, the interrupt and DMA requests still can be sent. Nations Technologies Inc. 236 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Otherwise the TIMx_CCDATx shadow register will be updated at the next update event. Here is an example. Nations Technologies Inc. 237 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
User should not modified TIMx_CTRL1.DIR by software, it is updated by hardware. Nations Technologies Inc. 238 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
To be on the safe side, user is suggested setting TIMx_EVTGEN.UDGN to generate an update by software before starting the counter, and not writing the counter while it is running. Nations Technologies Inc. 239 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When TIMx_CNT > TIMx_CCDATx, the reference PWM signal OCxREF is low. Otherwise it will be high. If the Nations Technologies Inc. 240 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Here is an example for the case that when ETRF input becomes high, the behavior of OCxREF signal for different value of OCxCEN. Timer is set to be in PWM mode in this case. Nations Technologies Inc. 242 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The relationships between the output signals of the dead-time generator and the reference signal OCxREF are as follow. Assume that TIMx_CCEN.CCxP=0, TIMx_CCEN.CCxNP=0, TIMx_BKDT.MOEN=1, TIMx_CCEN.CCxEN=1, Nations Technologies Inc. 243 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
If user set TIMx_CCEN.CCxEN=0 and TIMx_CCEN.CCxNEN=1, it will not complemented, and OCxN will become active when OCxREF is high. On the other hand, if user set TIMx_CCEN.CCxEN=1 and Nations Technologies Inc. 244 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
(CCxNP^OIxN)! = 0, that is, the OCx and OCxN still cannot be driven to active level at the same time. Nations Technologies Inc. 245 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
2. The slave mode is selected as reset mode (TIMx_SMCTRL.SMSEL=100), and the trigger input is selected as TI1 (TIMx_SMCTRL.TSEL=101); 3. Setting TIMx_CTRL1.CNTEN = 1 to start counter; Nations Technologies Inc. 247 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The delay between the rising edge on TI2 and the actual start of the counter is due to the resynchronization circuit on TI2 input. Nations Technologies Inc. 248 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The delay between the rising edge on TI1 and the actual stop of the counter is due to the resynchronization circuit on TI1 input. Figure 9-36 Control circuit in Gated mode Nations Technologies Inc. 249 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 250
When TI1 detects a rising edge, the counter starts counting on the rising edge of ETR, and the trigger flag is set (TIMx_STS.TITF=1); Nations Technologies Inc. 250 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The following figure shows the output timing diagram of OCx and OCxN when a COM commutation event occurs in three different configurations: Nations Technologies Inc. 251 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The relationship between the counting direction and the encoder signal is shown in Table 9-1 Counting direction versus encoder signals Nations Technologies Inc. 252 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The following figure shows the example of counter behavior when IC1FP1 polarity is inverted (CC1P= '1', other configurations are the same as above) Nations Technologies Inc. 253 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
(TIMx_CTRL2.CCPCTL=1) and support the rising edge of TRGI Trigger an update (TIMx_CTRL2.CCUSEL=1). This example is shown in the following figure. Nations Technologies Inc. 255 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In center-aligned symmetry mode, channel 4/7/8/9 trigger mode, only when TIMx_CTRL2.MMSEL3 = 1, the TRGO output will be valid. 00: Up-counting to CCDAT4/7/8/9, trigger valid Nations Technologies Inc. 260 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 261
10: Center-aligned mode 2. The counter counts in center-aligned mode, and the output compare interrupt flag bit is set to 1 when up-counting. Nations Technologies Inc. 261 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Trigger mode can automatically set TIMx_CTRL1.CNTEN bit by hardware. Control register 2 (TIMx_CTRL2) Offset address: 0x04 Nations Technologies Inc. 262 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 263
0: When TIMx_BKDT.MOEN = 0, after dead-time OC1N = 0 1: When TIMx_BKDT.MOEN = 0, after dead-time OC1N = 1 Nations Technologies Inc. 263 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 264
Note: This bit only applied to channels with complementary outputs. Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 264 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
01: ETRP frequency divided by 2 10: ETRP frequency divided by 4 11: ETRP frequency divided by 8 Nations Technologies Inc. 265 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 266
Note: These bits must be changed only when not in use (e. g. TIMx_SMCTRL.SMSEL=000) to avoid false edge detection at the transition. Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 266 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Offset address: 0x0C Reset value: 0x0000 Bit field Name Description Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 267 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
0: No break event occurred 1: An active level has been detected TITF Trigger interrupt flag Nations Technologies Inc. 269 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 270
(See TIMx_SMCTRL Register description) This bit is cleared by software. 0: No update event occurred Nations Technologies Inc. 270 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 273
Note 1: Only when TIMx_CTRL1.ONEPM = 1(In one-pulse mode), PWM mode can be used without verifying the preload register, otherwise no other behavior can be predicted. Nations Technologies Inc. 273 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 274
SAMPLING CK_INT 0010: f , N = 4 SAMPLING CK_INT 0011: f , N = 8 SAMPLING CK_INT Nations Technologies Inc. 274 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 276
Note: CC3SEL is writable only when the channel is off (TIMx_CCEN.CC3EN = 0). Input capture mode: Bit field Name Description 15:12 IC4F[3:0] Input Capture 4 filter Nations Technologies Inc. 276 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
See TIMx_CCEN.CC1EN description. 19:18 Reserved Reserved, the reset value must be maintained CC5P Capture/Compare 5 output polarity See TIMx_CCEN.CC1P description. Nations Technologies Inc. 277 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 278
1: Enable - Enable output OC1N signal. The level of OC1N depends on the value of these bits TIMx_BKDT.MOEN, TIMx_BKDT.OSSI, TIMx_BKDT.OSSR, TIMx_CTRL2.OI1, TIMx_CTRL2.OI1N and TIMx_CCEN.CC1EN. Nations Technologies Inc. 278 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Setting the TIMx_EVTGEN.UDGN bit will reload the content of TIMx_REPCNT.REPCNT and generate an update event. Capture/compare register 1 (TIMx_CCDAT1) Offset address: 0x34 Nations Technologies Inc. 281 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Otherwise, this preloaded value is transferred to the active register only when an update event occurs. Nations Technologies Inc. 283 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When configured as input mode, register CCDAT4 and CCDDAT4 are only readable. When configured as output mode, register CCDAT4 and CCDDAT4 are readable and writable. Nations Technologies Inc. 284 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 290
NOTE: This function is only for TIM1 Capture/compare register 9 (TIMx_CCDAT9) Offset address: 0x68 Reset value: 0x0000 Nations Technologies Inc. 290 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 291
Build-in FIFO is 64 bits with maximum index 63 which can only set window size to be 63. Nations Technologies Inc. 291 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 292
Clock prescaler scaling system clock to sample clock. Sample clock decides distance between two sample point. Only value at sample point will take into consideration for valid logic level calculation. Nations Technologies Inc. 292 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 293
Incremental (quadrature) encoder interface: used for tracking motion and resolving rotation direction and position; Hall sensor interface: used to do three-phase motor control; Nations Technologies Inc. 293 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The time-base unit mainly includes: prescaler, counter, and auto-reload. When the time base unit is working, the software can read and write the corresponding registers (TIMx_PSC, TIMx_CNT and TIMx_AR) at any time. Nations Technologies Inc. 294 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
DMA requests are generated. This setting is used in scenarios where you want to clear the counter but do not want to generate an update interrupt. Nations Technologies Inc. 295 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 296
The figure below shows some examples of the counter behavior and the update flags for different division factors in the up-counting mode. Nations Technologies Inc. 296 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Center-aligned mode is valid when the TIMx_CTRL1. CAMSEL bit is not equal to "00". The update events can be generated each time the counter overflows and each time the counter underflows. Nations Technologies Inc. 299 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Write a new value in TIMx_AR Auto-reload active register Clock selection The internal clock of timers :CK_INT Nations Technologies Inc. 301 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The delay between the rising edge of TI2 and the actual clock of the counter depends on the resynchronization circuit at the input of TI2. Nations Technologies Inc. 303 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Select the polarity on ETR pin by setting TIMx_SMCTRL.EXTP equal to ‘0’, The rising edge of ETR is valid External clock mode 2 is selected by setting TIMx_SMCTRL .EXCEN equal to ‘1’ Nations Technologies Inc. 304 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
ICx is sent to the capture register after frequency division. The following figure shows a block diagram of a capture/compare channel. Nations Technologies Inc. 305 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The output part generates an intermediate waveform OCxRef (active high) as reference. The polarity acts at the end of the chain. Nations Technologies Inc. 306 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
TIMx_CCMODx.ICxF bits. Example: If the input signal jitters up to 5 internal clock cycles, we must choose a filter duration longer than these 5 clock cycles. When 8 consecutive samples (sampled at f frequency) with Nations Technologies Inc. 308 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
For example, the following configuration flow can be used to know the period and duty cycle of the PWM signal on Nations Technologies Inc. 309 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
OCx get opposite value to CCxP polarity bit. On the other hand, user can set TIMx_CCMODx. Nations Technologies Inc. 310 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 311
Otherwise the TIMx_CCDATx shadow register will be updated at the next update event. Here is an example. Nations Technologies Inc. 311 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
User should not modified TIMx_CTRL1.DIR by software, it is updated by hardware. Examples of center-aligned PWM waveforms is as follow, and the setting of the waveform are: TIMx_AR=8, PWM Nations Technologies Inc. 312 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
PWM edge-aligned mode There are two kinds of configuration in edge-aligned mode, up-counting and down-counting. Nations Technologies Inc. 313 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
PWM cycle is 0. At the moment when the counter is 0 in the next PWM cycle, although the value of the counter = CCDATx shadow register = 0 and OCxREF = '0', no compare event will be generated. Nations Technologies Inc. 314 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
PULSE 5. Configure TIMx_CTRL1.ONEPM=1 to enable single pulse mode, configure TIMx_CCMOD1.OC1MD = ‘111’ to select PWM2 mode; Nations Technologies Inc. 315 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 316
Here is an example for the case that when ETRF input becomes high, the behavior of OCxREF signal for different value of OCxCEN. Timer is set to be in PWM mode in this case. Nations Technologies Inc. 316 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
After starting the timer, when TI1 detects a rising edge, the counter resets and restarts counting, and the trigger flag Nations Technologies Inc. 317 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The delay between the rising edge on TI2 and the actual start of the counter is due to the resynchronization circuit on TI1 input. Nations Technologies Inc. 318 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The delay between the rising edge on TI1 and the actual stop of the counter is due to the resynchronization circuit on TI1 input. Nations Technologies Inc. 319 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When TI1 detects a rising edge, the counter starts counting on the rising edge of ETR, and the trigger flag is set (TIMx_STS.TITF=1); Nations Technologies Inc. 320 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The synchronization function does not support dynamic change of the connection. User should configure and enable the slave timer before enable the master timer’s trigger or clock. Nations Technologies Inc. 321 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Setting TIM1_CTRL2.MMSEL=’100’ to use the OC1REF of TIM1 as trigger output. Configure TIM1_CCMOD1 register to configure the OC1REF output waveform. Nations Technologies Inc. 322 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
TI2FP2. The counting direction is automatically controlled by hardware TIMx_CTRL1.DIR. There are three types of encoder counting modes: 1. The counter only counts on the edge of TI1, TIMx_SMCTRL.SMSEL = ‘001’; Nations Technologies Inc. 325 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Reset Value TIMx_DADDR BURST[15:0] 04Ch Reserved Reset Value Control register 1 (TIMx_CTRL1) Offset address: 0x00 Reset value: 0x0000 0000 Nations Technologies Inc. 330 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 331
01: Center-aligned mode 1. The counter counts in center-aligned mode, and the output compare interrupt flag bit is set to 1 when down-counting. Nations Technologies Inc. 331 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 332
Note: external clock, gating mode and encoder mode can only work after TIMx_CTRL1.CNTEN bit is set in the software. Trigger mode can automatically set TIMx_CTRL1.CNTEN bit by hardware. Nations Technologies Inc. 332 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 333
1: When an update event occurs, a DMA request for CCx is sent. Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 333 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 334
, N = 8 SAMPLING CK_INT 0100: f /2, N = 6 SAMPLING 0101: f /2, N = 8 SAMPLING Nations Technologies Inc. 334 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 335
In this mode, the start and stop of the counter are controlled. Nations Technologies Inc. 335 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Reserved, the reset value must be maintained CC4OCF Capture/Compare 4 overcapture flag See TIMx_STS.CC1OCF description. CC3OCF Capture/Compare 3 overcapture flag See TIMx_STS.CC1OCF description. Nations Technologies Inc. 337 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 338
When TIMx_CTRL1.UPRS = 0, TIMx_CTRL1.UPDIS = 0, and set the TIMx_EVTGEN.UDGN bit by software to reinitialize the CNT. Nations Technologies Inc. 338 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
DMA will be generated. If The IMx_STS.CC1ITF is already pulled high, pull TIMx_STS.CC1OCF high. 0: No action 1: Generated a CC1 capture/compare event Nations Technologies Inc. 339 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 340
OC1 and OC1N, and is valid at high levels, while the active levels of OC1 and OC1N depend on the TIMx_CCEN.CC1P and TIMx_CCEN.CC1NP bits. Nations Technologies Inc. 340 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 341
TIMx_SMCTRL.TSEL. Note: CC1SEL is writable only when the channel is off (TIMx_CCEN.CC1EN = 0). Nations Technologies Inc. 341 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 342
01: Capture is done once every 2 events 10: Capture is done once every 4 events 11: Capture is done once every 8 events Nations Technologies Inc. 342 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 344
Note: CC3SEL is writable only when the channel is off (TIMx_CCEN.CC3EN = 0). Capture/compare enable registers (TIMx_CCEN) Offset address: 0x20 Reset value: 0x0000 Nations Technologies Inc. 344 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 345
At this time, this bit is used to disable/enable the capture function. 0: Disable capture 1: Enable capture Nations Technologies Inc. 345 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Each time an update event occurs, the PSC value is loaded into the active prescaler register. Auto-reload register (TIMx_AR) Offset address: 0x2C Reset values: 0xFFFF Nations Technologies Inc. 346 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 347
CC2 channel is configured as output: CCDAT2 contains the value to be compared to the counter TIMx_CNT, signaling on the OC2 output. Nations Technologies Inc. 347 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 348
When configured as output mode, register CCDAT3 is readable and writable. Capture/compare register 4 (TIMx_CCDAT4) Offset address: 0x40 Reset value: 0x0000 Bit field Name Description Nations Technologies Inc. 348 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 349
And then the second access to the TIMx_DADDR, you will access the address of DMA Base Address + 4” “ 00000: TIMx_CTRL1, 00001: TIMx_CTRL2, 00010: TIMx_SMCTRL, … Nations Technologies Inc. 349 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 350
For the fourth time, DMA access to the TIMx_ DADDR register will be mapped to access TIMx_CCDAT4 register; Channel 1 filter register (TIMx_C1FILT) Offset address: 0x70 Reset value: 0x0000 0000 Nations Technologies Inc. 350 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 351
Reserved, the reset value must be maintained 29:24 THRESH[5:0] Threshold number of sample logic level to be valid, maximum 63: Nations Technologies Inc. 351 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 352
Same rule applies to logic low. If Nations Technologies Inc. 352 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 353
Threshold value should set to more than or equal to half of Window value. Recommend threshold range is: Nations Technologies Inc. 353 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 354
Channel 3 Filter output, read only C2_FILTO Channel 2 Filter output, read only C1_FILTO Channel 1 Filter output, read only Nations Technologies Inc. 354 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The counter CK_CNT is valid only when the TIMx_CTRL1.CNTEN bit is set. The counter starts counting one clock cycle after the TIMx_CTRL1.CNTEN bit is set. Nations Technologies Inc. 355 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
For abbreviations used in registers, see section 1.1 These peripheral registers can be operated as half word (16-bits) or one word (32-bits). Nations Technologies Inc. 359 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Offset address: 0x00 Reset value: 0x0000 Bit field Name Description 15:8 Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 360 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 361
0: Disable update DMA request 1: Enable update DMA request Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 361 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 362
1: Timer counter will restart and all shadow register will be updated. It will restart prescaler counter also. Nations Technologies Inc. 362 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 363
These bits define the value that will be loaded into the actual auto-reload register. See 11.3.1 for more details. When the TIMx_AR.AR [15:0] value is null, the counter does not work. Nations Technologies Inc. 363 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 364
Configurable I/O polarity Encoder mode Pulse counting mode, support single pulse counting, double pulse counting (orthogonal and non-orthogonal) Nations Technologies Inc. 364 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The LPTIM only use external clock from comparator or external input1. This configuration is suitable for LOW Nations Technologies Inc. 365 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The filter sensitivity acts on the number of consecutive equal samples that should be detected on one of the LPTIM inputs to consider a signal level change as a valid transition. Nations Technologies Inc. 366 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Note: Any write to the LPTIM_CTRL.SNGMST/ LPTIM_CTRL.TSTCM bit will be discarded if the LPTIM is not enabled. Table 12-2 9 trigger inputs corresponding to LPTIM_CFG.TRGSEL[3:0] bits Corresponding trigger input Control bits Nations Technologies Inc. 367 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 368
If software trigger is used, setting LPTIM_CTRL.TSTCM bit will start the internal counter for continuous mode. Any subsequent external trigger event will be discarded as shown in Figure 12-3. Nations Technologies Inc. 368 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
(containing a zero value), the timer is restarted for a new count cycle, as shown in Figure 12-4. Nations Technologies Inc. 369 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In case of software start (LPTIM_CFG.TRGEN[1:0] = ‘00’), the LPTIM_CTRL.SNGMST setting will start the counter for one-shot counting. Nations Technologies Inc. 370 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 371
Figure 12-6 below shows the three possible waveforms that can be generated on the LPTIM output. Also, it shows the effect of the polarity change using the LPTIM_CFG.WAVEPOL bit. Nations Technologies Inc. 371 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The LPTIM_INTSTS.ARRUPD flag and the LPTIM_INTSTS.CMPUPD flag indicate when the write operation is completed to respectively the LPTIM_ARR register and the LPTIM_COMP register. Nations Technologies Inc. 372 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 373
Input1 and Input2 inputs must not exceed the LPTIM internal clock frequency divided by 4. This is mandatory in order to guarantee a proper operation of the LPTIM. Nations Technologies Inc. 373 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
‘0’. Also, the prescaler division ratio must be equal to its reset value which is 1 (LPTIM_CFG.CLKPRE[2:0] bits must be ‘000’). Nations Technologies Inc. 374 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
To activate the Non-Encoder mode the LPTIM_CFG.NENC bit has to be set to ‘1’. The LPTIM must first be configured in Continuous mode. Nations Technologies Inc. 375 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The waiting time is configured through the timeout value. Nations Technologies Inc. 376 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Direction change – UP flag signals up-counting direction change – DOWN flag signals down-counting direction change. Nations Technologies Inc. 377 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
OPT1 020h Reserved Reset Value LPTIM interrupt and status register (LPTIM_INTSTS) Address offset: 0x00 Reset value: 0x0000 0000 Nations Technologies Inc. 378 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 379
Direction change to down Clear Flag Writing 1 to this bit clear the DOWN flag in the LPTIM_INTSTS register Nations Technologies Inc. 379 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 381
0: The LPTIM output reflects the compare results between LPTIM_ARR and LPTIM_COMP registers 1: The LPTIM output reflects the inverse of the compare results between Nations Technologies Inc. 381 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 382
100: / 16 101: / 32 110: / 64 111: / 128 Reserved Reserved, the reset value must be maintained. Nations Technologies Inc. 382 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 383
The CKSEL bit selects which clock source the LPTIM will use: 0: LPTIM is clocked by internal clock source (APB1 clock or any of the embedded oscillators) Nations Technologies Inc. 383 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 384
LPTIM enable The LPTIMEN bit is set and cleared by software. 0: LPTIM is disabled 1: LPTIM is enabled Nations Technologies Inc. 384 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 385
This value must be strictly greater than the LPTIM_COMP.CMPVAL[15:0] value. LPTIM counter register (LPTIM_CNT) Address offset: 0x1C Reset value: 0x0000 0000 Nations Technologies Inc. 385 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 386
01: LPTIM Input 1 is connected to COMP1_OUT 10: LPTIM Input 1 is connected to COMP2_OUT 11: LPTIM Input 1 is connected to COMP3_OUT Nations Technologies Inc. 386 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 387
Reset and low-power wake-up can be matched. A system reset (if watchdog activated) occurs when the down counter reaches 0x000. Nations Technologies Inc. 387 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
IWDG_STS.PVU bit and/or IWDG_STS.CRVU bit. The reload operation (IWDG_KEY.KEYV[15:0] configured with value of 0xAAAA) will also cause the registers to Nations Technologies Inc. 388 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 389
Pre-scale register and reload register controls the time that generates reset, as shown in Table 13-1. Nations Technologies Inc. 389 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 391
Address offset : 0x04 Reset value : 0x00000000 Bit field Name Description 31:3 Reserved Reserved, the reset value must be maintained. Nations Technologies Inc. 391 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 392
IWDG_STS.CRVU bit is ‘0’. IWDG Status Register (IWDG_STS) Address offset : 0x0C Reset value : 0x00000000 Nations Technologies Inc. 392 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 393
Software can only try to change IWDG_PREDIV.PD[2:0] value when IWDG_KEY.KEYV[15:0] bits’ value is 0x5555 and this bit is 0. Nations Technologies Inc. 393 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Therefore, need to set any of higher 8 MSB bit (WWDG_CTRL.T [13:6]) to 1, preventing reset right Nations Technologies Inc. 394 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
) PCLK1 cycles. A reset is produced when it rolls over from 0x40 to 0x3F (T6 becomes cleared). Nations Technologies Inc. 397 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 398
‘0’. A write of ‘1’ has no effect. This bit is also set if the interrupt is not enabled. Nations Technologies Inc. 398 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 399
Interrupt generation At the end of conversion At the end of injection conversion Analog watchdog event Nations Technologies Inc. 399 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Signal types Annotations analog power supply and: 2.4V ≤ V ≤ Input, analog power supply Equivalent to V (3.6V) Nations Technologies Inc. 400 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 401
When switching the ADC 1M clock source, you need to ensure that the HSI clock is turned on Nations Technologies Inc. 401 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Regular sequence consists of multiple conversions, up to a maximum of 16. The ADC_RSEQx registers specify the regular channels and the conversion order of the regular channels. The ADC_RSEQ1.LEN[23:20] bits specified Nations Technologies Inc. 402 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Figure 15-3 ADC channels and Pin connections Internal channel The temperature sensor connects to channel ADC_IN17 VDDA connects to channel ADC_IN18 Nations Technologies Inc. 403 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 404
ADC_CTRL2.ON to 1 again through software. To start the conversion and after 14 cycles, the end of conversion flag bit will be set to 1 after the conversion is completed. Nations Technologies Inc. 404 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
All regular channels All injection and regular channels A single Injection channel A single Regulars of the channel Nations Technologies Inc. 405 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 406
When using this function, the time interval between Injected channel triggers are fired needs to be greater than the time it takes for the injection sequence to complete the transition. Nations Technologies Inc. 406 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
(If the last trigger occurs and the Nations Technologies Inc. 407 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
ADC_JOFFSETx register, so the result can be a negative value; for regular sequence , there is no need to subtract offset value. Nations Technologies Inc. 408 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Table 15-5 ADC is used for external triggering of regular channels EXTRSEL[2:0] Trigger source Type TIM1_CC1 event TIM1_CC2 event Internal signal from the on-chip timer TIM1_CC3 event Nations Technologies Inc. 410 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Through testing, it is found that the maximum Nations Technologies Inc. 411 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
ADC is powered on, so in order to shorten the delay, the ADC_CTRL2.TEMPEN and ADC_CTRL2.ON bits should be set at the same time. Nations Technologies Inc. 412 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Refer to Section 1. 1 for some abbreviations used in register descriptions. These peripheral registers must be operated in word (32-bit) mode. Nations Technologies Inc. 413 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
ADC_JDAT4 JDAT4[15:0] 048h Reserved Reset Value ADC_DAT DAT[15:0] 04Ch Reserved Reset Value ADC_DIFSEL DIFSEL[18:0] 050h Reserved Reset Value Nations Technologies Inc. 414 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 415
This bit is set by hardware at the end of all injection sequence channel conversions and cleared by software Nations Technologies Inc. 415 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 416
The software uses these bits to define the number of channels for converting regulars after receiving an external trigger in intermittent mode Nations Technologies Inc. 416 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 417
In scan mode, if the watchdog detects an out-of-range value, the scan is aborted only when that bit is set. 0: Disable simulated watchdog interruption. Nations Technologies Inc. 417 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 418
ADC_CTRL2.EXTRSEL[2:0] bit, which is used to initiate the conversion of a set of regular channels 0: Reset state. 1: Starts converting the regular channel. Nations Technologies Inc. 418 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 419
0: Do not use DMA mode. 1: Use DMA mode. Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 419 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 420
111: 239.5 cycles ADC_SAMPT3.SAMPSEL = 1, the sampling time is set as follows: 000: 1.5 cycles 100: 19.5 cycles Nations Technologies Inc. 420 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 422
Reserved, the reset value must be maintained 11:0 LTH[11:0] Analog watchdog low threshold These bits define the low thresholds for analog watchdog. Nations Technologies Inc. 422 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 423
These bits are software-defined as the number (0 to 18) of the 12th conversion channel in the conversion sequence. 24:20 SEQ11[4:0] 11th conversion in regular sequence 19:15 SEQ10[4:0] 10th conversion in regular sequence Nations Technologies Inc. 423 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 424
These bits are software-defined as the number of channels in the injected channel conversion sequence. 00: 1 conversion Nations Technologies Inc. 424 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 425
These bits are read-only and contain the conversion results of the injected channel. The data is left- aligned or right-aligned ADC regulars data register (ADC_DAT) Address offset: 0x4C Reset value: 0x0000 0000 Reserved DAT[15:0] Nations Technologies Inc. 425 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 426
This bit can be written by hardware or software After the differential input calibration is complete, the hardware will update it according to the calibration coefficient. Nations Technologies Inc. 426 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 427
This bit is set and cleared by the software to enable/disable regular channel conversion to end the interrupt Nations Technologies Inc. 427 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 428
Address offset: 0x5C Reset value: 0x0000 0000 Bit field Name Description 31:4 Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 428 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 429
011: 7.5 cycles 111: 601.5 cycles SAMP18[2:0] Channel Sample Time The channel sampling time definition is consistent with ADC_SAMPT2 Nations Technologies Inc. 429 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 431
COMP configuration process Complete configuration items are as follows. If the default configuration is used, skip the corresponding configuration items. Nations Technologies Inc. 431 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 432
OUT. The comparator INP pin has the following configuration. INPSEL COMP1 COMP2 COMP3 Nations Technologies Inc. 432 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 433
COMP supports interrupt response, and COMP1, COMP2, and COMP3 each occupy one interrupt entry. There are two cases of interrupt generation as follows. Nations Technologies Inc. 433 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 436
0: Comparators 1 and 2 are not in window mode. 1: Comparators 1 and 2 are in window mode. Nations Technologies Inc. 436 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 437
0: Output is low (non-inverting input below inverting input). 1: Output is high (non-inverting input above inverting input). Nations Technologies Inc. 437 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 438
Note: Depending on the product, when a timer is not available, the corresponding combination is reserved. Reserved Reserved, the reset value must be maintained INPSEL[2:0] Comparator 1 non-inverting input selection. Nations Technologies Inc. 438 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 439
For proper operation, the value of THRESH must be greater than SAMPW / 2. FILEN Filter enable. 0: Disable Nations Technologies Inc. 439 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 440
PWRMODE Power mode of Comparator 2 These bits are set and cleared by software(only if LOCK not set). Nations Technologies Inc. 440 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 441
Reserved, the reset value must be maintained INPSEL[2:0] Comparator 2 non-inverting input selection. 000: Window mode connection (PA1) 001: PA3 Nations Technologies Inc. 441 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 442
For proper operation, the value of THRESH must be greater than SAMPW / 2. FILEN Filter enable. 0: Disable 1: Enable Nations Technologies Inc. 442 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 443
Bit select to choose COPM2 output or the XOR output(comparison of COMP1&2) outputs 0: COMP2 Output 1: XOR(comparison) output between results of COMP1 and COMP2 Nations Technologies Inc. 443 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 444
These bits select which Timer input must be connected with the comparator 3 output. 0000: Reserved. 0001: TIM1_BKIN 0010: TIM1_OCrefclear 0011: TIM1_IC1 0100: TIM2_IC1 Nations Technologies Inc. 444 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 446
2: Every 3 cycle … COMP reference voltage register (COMP_VREFSCL) Address offset : 0x40 Reset value : 0x0000 0000 Nations Technologies Inc. 446 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 447
Comparator biasing current test enable by software. Once enabled, the biasing current can be measured on comp_ib_test. 0: disable 1: enable Comparator VREF test enable by software: 0: disable 1: enable Nations Technologies Inc. 447 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 448
This bit indicate the interrupt status of COMP2,write 0 to clear. COMP1IS This bit indicate the interrupt status of COMP1,write 0 to clear. Nations Technologies Inc. 448 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 449
It support interrupt mode, users can turn on or disable interrupt according to their needs. Nations Technologies Inc. 449 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 450
The block diagram of I C interface is shown in the figure below. Nations Technologies Inc. 450 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
This process is generally named Clock Synchronization and Arbitration. I2C module has two key features: Nations Technologies Inc. 451 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 452
The I2C host is responsible for generating the start bit and the end bit in order to start and end a transmission. And is responsible for generating the SCL clock. Nations Technologies Inc. 452 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 453
I2C_STS1.TXDATE bit is set after the second last byte is sent until the stop end bit is detected. Nations Technologies Inc. 453 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
3. When the first byte is received, the I2C_STS1.RXDATNE bit (the received data is not empty) is set to 1 by hardware. If the I2C_CTRL2.EVTINTEN and I2C_CTRL2.BUFINTEN bits are set, an interrupt is generated. Nations Technologies Inc. 454 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
I2C timing. When these two steps are completed, I2C runs in the slave mode by default, waiting for receiving the start bit and address. Nations Technologies Inc. 455 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 456
The software sets the I2C_CTRL1.STOPGEN bit at this time to generate a stop condition, and then the I2C interface will automatically return to the slave mode (I2C_STS2.MSMODE bit is cleared). Nations Technologies Inc. 456 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
(I2C_STS2.MSMODE bit is set to 1). Once the start condition is issued, the I2C hardware sets I2C_STS1.STARTBF(start bit flag) and enters the host Nations Technologies Inc. 457 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 458
Since I2C_CTRL1.ACKEN has been cleared to 0 in the previous step, I2C no longer sends ACK for the last Nations Technologies Inc. 458 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
I2C errors mainly include bus error, acknowledge error, arbitration loss, overload\ underload error. These errors may cause communication failure. Nations Technologies Inc. 459 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 460
Before transfer current byte at the end DMA requests must be answered. If set the DMA channel transfer data is done, DMA will send EOT(End Of Transmission) to I2C, and ocurrs a interrupt when enable interrupt bit. Nations Technologies Inc. 460 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 461
In DMA_CHCFGx register clear DIR to configure when ocurrs a interrupt request whether received half data or all data is received. In the DMA_CHCFGx register set CHEN bit to activate the channle. Nations Technologies Inc. 461 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 462
SMBus base on I2C commincate standard. SMBus have a control bus for system and power management Nations Technologies Inc. 462 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
SMBus specification v2.0(http://smbus.org/specs/). User’s software can device what protocols are implemented. : Note SMBus does not support Quick command protocol Nations Technologies Inc. 463 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 464
The communication process on SMBus is similar to that on I2C.To use the SMBus mode, you need to configure Nations Technologies Inc. 464 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Reserved Reset Value I2C_TMRISE SCLDFW[3:0] SDADFW[3:0] TMRISE[5:0] 020h Reserved Reset Value Control register 1 (I2C_CTRL1) Address offset: 0x00 Nations Technologies Inc. 466 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 467
It can be set or cleared by software. Or when I2C_CTRL1.EN equals to 0, it will be cleared by ACKEN hardware. 0:No acknowledge send; 1:Send an acknowledge after receiving a byte STOPGEN Stop generation Nations Technologies Inc. 467 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 468
Reserved, the reset value must be maintained. SMBus mode SMBMODE 0:I2C mode; 1:SMBus mode. I2C Peripheral enable 0:Disable I2C module; 1:Enable I2C module Nations Technologies Inc. 468 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 469
I2C_STS1.RXDATNE = 1 if I2C_CTRL2.BUFINTEN = 1 ERRINTEN Error interrupt enable 0:Disable error interrupt; 1:Enable error interrupt. This interrupt is generated when: Nations Technologies Inc. 469 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 470
7~1 bits of the address. ADDR0 Interface address 0 bit of the address. Note: don't care these bits in 7-bit address mode Nations Technologies Inc. 470 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 472
Writing ‘0’ to this bit by software can clear it, or it is cleared by hardware when I2C_CTRL1.EN=0. 0: No acknowledge failed; 1: Acknowledge failed. ARLOST Arbitration lost (master mode) Nations Technologies Inc. 472 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 473
After a ACK, the hardware sets this bit to' 1' when the slave device detects a stop condition on the bus. Nations Technologies Inc. 473 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 474
1: Start condition has been sent. This bit is set to' 1' when the start condition is sent. Nations Technologies Inc. 474 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 475
At the end of the whole address transmission stage, this bit is set according to the R/W bit of the address byte. BUSY Bus busy Hardware clears this bit when a stop condition is detected. Nations Technologies Inc. 475 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 476
If duty cycle = Tlow/Thigh = 2/1: CLKCTRL = f (Hz)/100000/3 PCLK1 Tlow = 2 × CLKCTRL× T PCLK1 Thigh = CLKCTRL× T PCLK1 Nations Technologies Inc. 476 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 477
01: 15ns 10: 25ns 11: 35ns Note: analog filter has a wide range of variance with different PVT Nations Technologies Inc. 477 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 478
If the result is not an integer, write the integer part to TMRISE[5:0] to ensure the t parameter. HIGH Nations Technologies Inc. 478 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 479
LIN break frame detection, noise flag/overflow error/frame error in multi-buffer communication Nations Technologies Inc. 479 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
TX pin is pulled high. When the transmitter is inactive, the TX pin reverts to the I/O port configuration. RX is an input pin for serial data reception, data is recovered by oversampling technique. Nations Technologies Inc. 480 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 481
A break frame means that all bits in one frame period receive '0'. At the end of the break frame, the transmitter inserts 1 or 2 more stop bits ('1') to acknowledge the start bit. Nations Technologies Inc. 481 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
USART_CTRL1.TXEN is reset during a data transfer, it will cause the baud rate counter to stop counting and the data being transferred will be corrupted. Nations Technologies Inc. 482 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
9-bit data, the break frame consists of 11 bits of low level, followed by a stop bit. Nations Technologies Inc. 483 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 484
When a frame containing data is sent and USART_STS.TXDE=1, the USART_STS.TXC bit is set to '1' by hardware. Nations Technologies Inc. 484 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
10th bits have two '0' points, then it is confirmed that the start bit is received, but it will be set bit NEF noise flag. Nations Technologies Inc. 485 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
USART_STS.RXDNE at the end of the 1.5th stop bit. The 1.5 stop bits were sampled at points 16, 17 and 18. Nations Technologies Inc. 486 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 487
The frame error flag(USART_STS.FEF) is set by hardware when the receiver detects a break frame. It can be cleared by a software sequence (read USART_STS register first, then write USART_DAT register). Nations Technologies Inc. 487 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
NE status Received bits Data validity Effective be invalid be invalid be invalid be invalid be invalid be invalid Nations Technologies Inc. 488 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 489
So USART_BRCF = 0x150 Example 3: If USART_BRCF = 0x19B: DIV_Integer = 0x19 = 25 DIV_Decimal = 0x0B = 11 Nations Technologies Inc. 489 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The tolerance of the USART receiver is equal to the maximum tolerable variation. Nations Technologies Inc. 490 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Make the number of '1' in the transmitted data (including parity bit ) be an odd number. That is: if Data=11000101, Nations Technologies Inc. 491 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 492
5. Start the channel. 6. After the data transfer is completed, the transfer complete flag (DMA_INTSTS.TXCFx) is set to 1. Nations Technologies Inc. 492 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Figure 18-9 hardware flow control between two USART DEVICE 1 DEVICE 2 TX control RX control RX control TX control Nations Technologies Inc. 494 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
If the USART_CTRL3.CTSEN bit is set, the USART_STS.CTSF bit will be set high by hardware when the nCTS input changes state. An interrupt will be generated if USART_CTRL3.CTSIEN is enabled. Nations Technologies Inc. 495 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
As shown in the Figure 18-12 below, when an idle frame is detected, USART is woken up, and then Nations Technologies Inc. 496 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
USART_CTRL1.RCVWU is cleared. The USART_STS.RXDNE bit will be set when this matching address is received. Data can then be transmitted normally. Nations Technologies Inc. 497 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
USART_DAT register. The USART_CTRL2.LBCLK bit controls whether to output the clock pulse corresponding to the last data byte (MSB) Nations Technologies Inc. 498 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
But setup time and hold time (depending on baud rate, 1/16 bit time) must be considered. Figure 18-14 USART synchronous transmission example Nations Technologies Inc. 499 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Single-wire half-duplex mode USART supports single-wire half-duplex communication, allowing data to be transmitted in both directions, but only Nations Technologies Inc. 501 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 502
IrDA receive line. If the USART is receiving data sent from the SIR receiver decoder, the data sent by the USART to the IrDA transmitter encoder will not be encoded. Nations Technologies Inc. 502 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Figure 18-19 IrDA data Modulation (3/16)-normal mode Start TX normal Stop frame TX pin frame 3/16 RX pin frame Start RX normal Stop frame Nations Technologies Inc. 503 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 504
If a '1' is sampled before the 10th or 11th sample point, the current detection is canceled and the start bit is searched again. Nations Technologies Inc. 504 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When a parity error is detected by receiver, the transmit data line is pulled low for one baud clock cycle at the end of Nations Technologies Inc. 506 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
(USART_GTP.GTV[7:0]). The clearing of the USART_STS.TXC flag is not affected by the smart card mode. The following figure details how USART samples NACK signals. Nations Technologies Inc. 507 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
000h Reserved Reset Value USART_DAT DATV[8:0] 004h Reserved Reset Value DIV_Decimal USART_BRCF DIV_Integer[11:0] [3:0] 008h Reserved Reset Value Nations Technologies Inc. 509 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 510
ADDR[3:0] [1:0] 010h Reserved Reset Value USART_CTRL3 014h Reserved Reset Value USART_GTP GTV[7:0] PSCV[7:0] 018h Reserved Reset Value Nations Technologies Inc. 510 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 511
Setting USART_CTRL1.TXCIEN bit will generate an interrupt. This bit is cleared by software. 0: Transmitting did not complete. Nations Technologies Inc. 511 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 512
1: A framing error or a Break Character is detected. Note: this bit will not generate an interrupt because it appears with Nations Technologies Inc. 512 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 513
Reset value : 0x0000 0000 Note: The baud counter stops counting if USART_CTRL1.TXEN or USART_CTRL1.RXEN are disabled respectively. Nations Technologies Inc. 513 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 514
Parity control enable 0: Verification control is disabled. 1: Verification control is enabled. PSEL Parity selection. 0: even check. Nations Technologies Inc. 514 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 515
This bit is cleared by hardware during stop bit of the break frame transmission. 0: No break character was sent. 1: Send a break character. Nations Technologies Inc. 515 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 516
(MSB) is output on CK pin in synchronous mode. 0: The clock pulse of the last bit of data is not output from CK. Nations Technologies Inc. 516 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 517
If this bit is set to 1, an interrupt will be generated when USART_STS.CTSF bit is set. 0:CTS interrupt is disabled. 1:CTS interrupt is enabled. Nations Technologies Inc. 517 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 518
When DMA receive mode (USART_CTRL3.DMARXEN=1) is enabled, an interrupt will be generated when USART_STS.FEF, USART_STS. OREF or USART_STS. NEF Nations Technologies Inc. 518 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 519
0000: reserved-do not write this value. 0001: Divide the source clock by 2. 0010: Divide the source clock by 4. Nations Technologies Inc. 519 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 520
1111: Divide the source clock by 62. In Smartcard mode, PSCV[7:5] is reserved. Note: This bit is invalid for UART3/4. Nations Technologies Inc. 520 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 521
Steady state clock polarity programmable. The data direction is always MSB first. Supports DMA functionality. Nations Technologies Inc. 521 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
I/O pin of the master device to control the NSS pin of the slave device. Software NSS mode Nations Technologies Inc. 522 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Figure 19-2 Selective management of hardware/software The following figure is an example of the interconnection of single master and single slave devices Nations Technologies Inc. 523 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Figure 19-4 is the combination timing of four CLKPHA and CLKPOL bits transmitted by SPI when the SPI_CTRL1.LSBFF=0. Nations Technologies Inc. 524 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
MOSI pin. At the same time, the data received on the MISO pin is serially shifted into the shift register in the same order and then loaded into the SPI_DAT register in parallel. The software operation process is as follows: Nations Technologies Inc. 525 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Wait for SPI_STS.TE bit to be set to '1', and write the second data to be sent into SPI_DAT. Repeat this operation to send subsequent data; Nations Technologies Inc. 526 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The process of data receiving can also be implemented in the interrupt handler generated by the rising edge of the RNE flag(SPI_STS.RNE). Figure 19-7 Schematic diagram of RNE change when continuous transmission occurs in receive-only mode (BIDIRMODE=0 Nations Technologies Inc. 527 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 528
The data transfer process begins when the slave device receives the first clock edge. Before the master starts data transfer, software must ensure that the data to be send is written to the SPI_DAT register. Nations Technologies Inc. 528 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The data receiving process begins when the slave device receives the clock signal and the first data bit from the Nations Technologies Inc. 529 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 530
In master mode, the sending process starts when data is written to the send buffer. If the next data has been written Nations Technologies Inc. 530 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When the send buffer is empty, the TE flag(SPI_STS.TE) is set to 1, which means that new data can be written into Nations Technologies Inc. 531 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 532
1. Wait for the penultimate RNE(SPI_STS.RNE) to be set to 1; 2. Before closing the SPI module (SPI_CTRL1.SPIEN=0), wait for 1 SPI clock cycle (using software delay); Nations Technologies Inc. 532 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 533
1, and wait for the BUSY flag(SPI_STS.BUSY) bit to be set to 0. Nations Technologies Inc. 533 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
8-bit data frame format adopts CRC8, and the 16-bit data frame format adopts CRC16. The polynomial used in Nations Technologies Inc. 534 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 535
At this time, the overflow flag SPI_STS.OVER bit is set to 1. An interrupt is generated if the user enables the corresponding interrupt(SPI_CTRL2.ERRINTEN=1). All received data is lost, and the SPI_DAT register retains only previously unread data. Nations Technologies Inc. 535 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
MCLK: master clock (independent mapping, optional), output 256 × Fs clock signal to ensure better Nations Technologies Inc. 537 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 538
(MSB) is sent and will change on the falling edge of the clock signal. Nations Technologies Inc. 538 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
CPU will first read the SPI_DAT register to get 0x95AA, and then read the SPI_DAT register to get 0x6600 (only the upper 8-bit data is valid, and the lower 8-bit data is always 0). Nations Technologies Inc. 539 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 540
(MSB) are generated simultaneously. The standard data receiving and sending processing mode is the same as I S Philips standard. Nations Technologies Inc. 540 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
RNE(SPI_STS.RNE) event will be generated. In this way, there is more time between 2 reads and writes, which can prevent underflow or overflow from happening. PCM standard Nations Technologies Inc. 543 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In the master mode, the linear divider needs to be set correctly in order to obtain the desired audio frequency. Nations Technologies Inc. 544 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The exact audio frequency can be obtained by referring to the clock configuration in the table below. Nations Technologies Inc. 545 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When I2S works in master mode, the CLK pin outputs the serial clock, the WS pin generates the channel selection Nations Technologies Inc. 546 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 547
When I S function is turned off, different audio standards, data length and channel length adopt different operation steps: Nations Technologies Inc. 547 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 548
0 by hardware (software operation is invalid). In master receiving mode (SPI_I2SCFG.MODCFG=11), the BUSY flag(SPI_STS.BUSY) is set to 0 during receiving. Nations Technologies Inc. 548 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Working in I2S mode, it does not need data transmission protection function, so it does not need to support CRC, other DMA functions are the same as SPI mode. Nations Technologies Inc. 549 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
BIDIRMODE Bidirectional data mode enable 0: Select the "two-wire one-way" mode. 1: Select the "one-wire bidirectional " mode. Nations Technologies Inc. 550 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 551
0: Disable software slave device management. 1: Enable software slave device management. Note: Not used in I S mode. Nations Technologies Inc. 551 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 552
1: Data is sampled on the second clock edge. Note: This bit cannot be changed during communication. Note: Not used in I S mode. Nations Technologies Inc. 552 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 554
Receive buffer is not empty 0: The receive buffer is empty. 1: The receive buffer is not empty. Nations Technologies Inc. 554 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 555
SPI RX CRC register (SPI_CRCRDAT) (not used in I S mode) Address offset: 0x14 Reset value: 0x0000 Nations Technologies Inc. 555 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 556
Note: not used in I s mode. SPI_ I S configuration register(SPI_I2SCFG) Address offset: 0x1c Reset value: 0x0000 Nations Technologies Inc. 556 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 557
Note: For correct operation, this bit can only be set when I S is turned off. Note: not used in SPI mode. Nations Technologies Inc. 557 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 558
Note: For correct operation, this bit can only be set when I S is turned off. Use this bit only in S master mode. Not used in SPI mode. Nations Technologies Inc. 558 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 559
RTC provides a variety of ways to wakeup from all low-power modes (RUN mode, SLEEP mode, STOP0 mode, STOP2 mode and STANDBY mode. Nations Technologies Inc. 559 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The Tamper event also causes an erase of Back up registers when enabled. It is also a Tamper source of hardware trigger to LP Timer. Nations Technologies Inc. 560 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Tamper Detection RTC_TAMP3 TAM3F Erase RTC_BKP(1~20) RTC includes the following functions: Alarm A and Alarm B event/interrupt Nations Technologies Inc. 561 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 562
RTC_WRP register. During or before and after the unlocking process, the write operation to other registers does not affect the unlocking result. Nations Technologies Inc. 562 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 563
), and APB1 clock frequency lower than RTC clock frequency is not allowed in any RTCCLK case. System reset will reset shadow registers. Nations Technologies Inc. 563 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 565
When RTC_CTRL.OUTSEL[1:0] !=0, RTC_ALARM alternate function output is enable. There are Alarm A output, Alarm B output and Wakeup output to choose by the value of RTC_CTRL.OUTSEL[1:0] bits. Nations Technologies Inc. 565 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 566
Timestamp can be enabled by setting RTC_CTRL.TSEN bit to 1. When a timestamp event is detected on the RTC_TS Nations Technologies Inc. 566 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 567
RTC_BKP(1~20) will not occur at the same time. It is recommended to start the tamper detection function after writing RTC_BKP(1~20). Filtered level detection of RTC_TAMPx input Nations Technologies Inc. 567 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 568
) can be calculated by using the formula given below: _.∗512−_.[8:0] = ∗ (1 + + _.[8:0] – _. ∗ 512 Nations Technologies Inc. 568 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 569
The new calibration settings will take effect within 3 ck_apre cycles after a data write to the RTC_CALIB. RTC low power mode The working state of RTC in low power mode. Nations Technologies Inc. 569 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
MIU[3:0] SET[2:0] SEU[3:0] 020h Reset Value RTC_WRP PKEY[7:0] 024h Reserved Reset Value RTC_SUBS SS[15:0] 028h Reserved Reset Value Nations Technologies Inc. 570 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 571
Describes the hour tens value in BCD format 19:16 HOU[3:0] Describes the hour units value in BCD format Nations Technologies Inc. 571 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 572
Describes the date units value in BCD format RTC Control Register (RTC_CTRL) Address offset: 0x08 Reset value: 0x0000 0000 Nations Technologies Inc. 572 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 573
1: Adds 1 hour to the current time. TSIEN Time-stamp interrupt enable 0: Disable time-stamp interrupt. 1: Enable time-stamp interrupt. Nations Technologies Inc. 573 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 574
TSE need to be reset when TEDGE is changed to avoid unwanted RTC_INITSTS.TISF setting. WKUPSEL[2:0] Wakeup clock selection 000: RTC clock is divided by 16 Nations Technologies Inc. 574 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 575
TISOVF only after clearing the TISF bit. Otherwise, an overflow might not be noticed if a timestamp event occurs immediately before the TISF bit is being cleared. Nations Technologies Inc. 575 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 576
RTC_SCTRL register. It is cleared by hardware when the corresponding shift operation has been completed, note that writing to the SHOPF bit has no effect. Nations Technologies Inc. 576 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 578
Describes the date units value in BCD format MASK3 Alarm hours mask 0: Hours match 1: Hours not match AM/PM notation Nations Technologies Inc. 578 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 579
0: Hours match 1: Hours not match AM/PM notation 0: AM or 24 hours format 1: PM format Nations Technologies Inc. 579 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 580
For detail on how to unlock RTC register write protection, see chapter RTC write protection register. RTC Sub-second Register (RTC_SUBS) Address offset: 0x28 Reset value: 0x0000 0000 Nations Technologies Inc. 580 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 581
When RTC_INITSTS.RSYF=1, the shadow registers have been updated with the shifted time. RTC Timestamp Time Register (RTC_TST) Address offset: 0x30 Reset value: 0x0000 0000 Nations Technologies Inc. 581 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 582
Describes the month tens value in BCD format 11:8 MOU[3:0] Describes the month units value in BCD format Nations Technologies Inc. 582 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 583
This feature is intended to be used along with CM[8:0]. When RTCCLK frequency is 32768 Hz, the number of RTCCLK pulses added during a 32-second window is ((512 Nations Technologies Inc. 583 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 584
0: Disable tamper 3 interrupt when TPINTEN = 0. 1: Enabled tamper 3 interrupt TP2MF Tamper 2 mask flag 0: Not mask tamper 2 event. Nations Technologies Inc. 584 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 585
0x4: Sampling once every 2048 RTCCLK. 0x5: Sampling once every 1024 RTCCLK. 0x6: Sampling once every 512 RTCCLK. Nations Technologies Inc. 585 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 587
Address offset: 0x48 Reset value: 0x0000 0000 Bit field Name Description 31:28 Reserved Reserved, the reset value must be maintained Nations Technologies Inc. 587 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
4 MHz output. Then by setting BEEPER_CTRL.BEEPDIV dumber of 250 we can get 8 KHz signal and with BEEPER_CTRL.BEEPDIV = 500 we can get 4 KHz signal. Nations Technologies Inc. 590 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 592
1: Both outputs are turned on, and the outputs are complementary BEEPEN Beeper enable 1: Beeper enable 0: Beeper disable Nations Technologies Inc. 592 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 593
CAN network. With increase number of CAN nodes, messages in CAN network also increase dramatically which will occupides lots of CPU resource. In this CAN controller, receive FIFOs and filter mechanism Nations Technologies Inc. 593 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
CANTX pin is disabled. CAN is in normal mode when CAN_MSTS.INIAK and CAN_MSTS.SLPAK bits are both '0', and it must Nations Technologies Inc. 594 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 595
CAN bus activity is detected, regardless of whether the hardware is enabled to automatically wake up CAN. Nations Technologies Inc. 595 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
CAN has two receiving FIFOs, each of which can store three complete messages. No application program is needed to manage it, and it is managed by hardware. Nations Technologies Inc. 596 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
To enter loopback mode, the CAN_BTIM.SLM bit should be cleared and the CAN_BTIM.LBM bit should be set. Nations Technologies Inc. 597 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
CAN bus, without affecting the bus because dominant bits is not actually sent to the bus. To enter silent mode, the CAN_BTIM.SLM bit should be set and the CAN_BTIM.LBM bit should be cleared. Nations Technologies Inc. 598 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
To enter loopback silence mode, both the CAN_BTIM.SLM bit and the CAN_BTIM.LBM bit should be set. Figure 22-6 loopback silent mode CAN-CTRL transceiver CAN_Bus Nations Technologies Inc. 599 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 600
When more than one sending mailbox is registered, the sending order is determined by the identifier of the message in the mailbox. Nations Technologies Inc. 600 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 601
CAN_TSTS.RQCPM bit. At the same time, the transmission result can query the CAN_TSTS.TXOKM, CAN_TSTS.ALSTM and CAN_TSTS.TERRM bits. Nations Technologies Inc. 601 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When the FIFO overrun, the FFOVR bit will be set . If the FIFO overrun interrupt is currently enabled (the Nations Technologies Inc. 603 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 604
And the filter group should be set to work in identifier list mode in order to filter out an identifier. Nations Technologies Inc. 604 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
The filter ID is used to store the identifier format, and the filter MASK is used to indicate which bits must be checked and which bits can be ignored. Identifier list mode Nations Technologies Inc. 605 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
32 bit list mode 16 bit list mode 2/3/4/5 FIFO1 32 bit mask mode 16 bit mask mode Nations Technologies Inc. 606 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Message should be written into an empty sending mailbox by software before enable the sending request. You can query the CAN_TSTS register for the sending status. Nations Technologies Inc. 607 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
In the above description, RSJW(the resynchronization hop width) defines the upper limit of how many time units can Nations Technologies Inc. 608 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
When FIFO1 becomes full, the CAN_RFF1.FFULL1 bit is set. When FIFO1 overruns, and the CAN_ RFF1.FFOVR1 bit is set. Send interrupts(CAN_TX_IRQn): Nations Technologies Inc. 611 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
CAN configuration flow can divided into serval phases. Nations Technologies Inc. 612 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 613
For Reception: User can also change a filter value (CAN_FiRx) when the corresponding filter is deactivated. To deactivate Nations Technologies Inc. 613 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 614
In addition, only when the whole filter is set to the initialization mode (that is, CAN_FMC.FINITM=1), the settings of the filter can be modified, that is, the CAN_FM1,CAN_FS1 and CAN_FFA1 registers can be modified. Nations Technologies Inc. 614 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 617
240h Reset Value CAN_F0B2 FBC[31:0] 244h Reset Value CAN_F1B1 FBC[31:0] 248h Reset Value CAN_F1B2 FBC[31:0] 24Ch Reset Value Nations Technologies Inc. 617 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 618
Offset Register CAN_F13B1 FBC[31:0] 2A8h Reset Value CAN_F13B2 FBC[31:0] 2ACh Reset Value Nations Technologies Inc. 618 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 619
Notes: For more information about bus-off status, please refer to 22.5.1: Error management. Nations Technologies Inc. 619 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 620
CAN activity (sending or receiving) is over, the hardware sets the CAN_MSTS.INIAK bit and CAN enters initialization mode. Nations Technologies Inc. 620 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 621
If the CAN_INTE.ERRITE bit is set, a state change interrupt is generated. This bit is cleared by software. SLPAK Sleep acknowledge Nations Technologies Inc. 621 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 622
Transmit mailbox 2 empty When there is no message waiting to be sent in mailbox 2, hardware sets this bit. Nations Technologies Inc. 622 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 623
When the mailbox 1 fails to send due to the loss of arbitration, set this bit TXOKM1 Transmission OK of mailbox 1 Nations Technologies Inc. 623 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 624
CAN_TSTS.ALSTM0 and CAN_TSTS.TERRM0 bits) of mailbox 0 are also cleared. CAN receive FIFO 0 register (CAN_RFF0) Address offset: 0x0c Reset value: 0x0000 0000 Nations Technologies Inc. 624 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 625
Release FIFO 1 output mailbox. The software releases the output mailbox of the receive FIFO by setting this bit. If Nations Technologies Inc. 625 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 626
0: When there is an error registration in the CAN_ESTS register, no interrupt is generated; 1: When there is an error registration in the CAN_ESTS register, an interrupt is generated. Nations Technologies Inc. 626 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 627
Notes: Please refer to 22.5 Section CAN interrupt. CAN error status register (CAN_ESTS) Address offset: 0x18 Reset value: 0x0000 0000 Nations Technologies Inc. 627 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 628
(The value of the receiving error counter or the sending error counter is > 127). Nations Technologies Inc. 628 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 629
Baud rate prescaler This bit field defines the time length of the time unit (tq) =(BRTP[9:0]+1) x t PCLK Nations Technologies Inc. 629 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 630
When the mailbox is not empty, all bits in this register are write-protected. Address offset: 0x184, 0x194, 0x1A4 Reset value: undefined Nations Technologies Inc. 630 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 631
Name Describe 31:24 DATA3[7:0] Data byte 3 Data byte 3 of the message. 23:16 DATA2[7:0] Data byte 2 Nations Technologies Inc. 631 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 634
Data byte 5 Data byte 5 of the message. DATA4[7:0] Data byte 4 Data byte 4 of the message. Nations Technologies Inc. 634 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 635
1: Two 32-bit registers of CAN_FiRx work in identifier list mode. CAN filter scale register (CAN_FS1) Address offset: 0x20C Nations Technologies Inc. 635 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 636
1: the filter is associated to FIFO1. CAN filter activation register (CAN_FA1) Address offset: 0x21C Reset value: 0x0000 0000 Nations Technologies Inc. 636 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 637
Notes: According to the different settings of filter bit width and mode, the functions of the two registers in the filter Nations Technologies Inc. 637 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 638
Mask/identifier register in mask mode has the same definition as register bit in identifier list mode. See for the address of the filter bank register Table 22-4. Nations Technologies Inc. 638 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
-M4F core hardware debugging module can provide the following debugging functions: SWJ-DP: serial /JTAG debug port AHP-AP:AHB access port ITM: execution tracking unit Nations Technologies Inc. 639 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 640
See the following Table for the pin allocation of JTAG debugging interface and SW debugging interface (SWDIO is multiplexed with JTMS, SWCLK is multiplexed with JTCK): Nations Technologies Inc. 640 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Timer peripheral: the timer counter stops and debugs; I2C peripheral: the SMBUS of I2C keeps the state and carries out debugging; Nations Technologies Inc. 641 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
See the description of DEV_NUM_L[3:0]. 11:8 DEV_NUM_M[3:0] The middle 4 bits of device. See the description of DEV_NUM_L[3:0]. Nations Technologies Inc. 642 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 643
1: Window watchdog counter stops working. IWDG_STOP The watchdog stops working when the kernel enters the debugging state. Set or cleared by software. Nations Technologies Inc. 643 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 644
1:(FCLK ON, HCLK ON) In sleep mode, both the FCLK and HCLK clocks are provided by the previously configured system clock. Nations Technologies Inc. 644 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 646
Version history Date Version Remark 2022.5.10 V1.0 Initial release Nations Technologies Inc. 646 / 647 Tel:+86-755-86309900 Email:info@nationstech.com Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North. Nanshan District, Shenzhen, 518057, P.R.China...
Page 647
It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. In no event shall NATIONS be liable for any direct, indirect, incidental, special, exemplary, or consequential damages arising in any way out of the use of this document or the Product.
Need help?
Do you have a question about the N32G430 Series and is the answer not in the manual?
Questions and answers