embeded/Cortex-M3 STM2026. 1. 27. 18:26

대충 보니

BOR Reset(brown out detection reset - 전압 강하로 인한 재기동)

PIN Reset (NRST pin reset - 하드웨어 리셋)

POR Reset (Power on Reset)

SFT Reset (Software Reset)

IWDG1 Reset (Independent Watchdog reset)

WWDG Reset (window Watchdog reset)

#define RCC_FLAG_BORRST                ((uint8_t)0x95)
#define RCC_FLAG_PINRST                ((uint8_t)0x96)
#define RCC_FLAG_PORRST                ((uint8_t)0x97)
#define RCC_FLAG_SFTRST                ((uint8_t)0x98)
#define RCC_FLAG_IWDG1RST              ((uint8_t)0x9A)
#define RCC_FLAG_WWDG1RST              ((uint8_t)0x9C)
#define RCC_FLAG_LPWR1RST              ((uint8_t)0x9E)
#define RCC_FLAG_LPWR2RST              ((uint8_t)0x9F)

[링크 : https://community.st.com/t5/stm32-mcus-products/software-reset-flag-sftrstf-in-rcc-csr-register-what-source/td-p/544463]

[링크 : https://community.st.com/t5/stm32-mcus-products/stm32f407-spurious-reset-rcc-flag-pinrst/td-p/147931]

 

저전력 모드 보안 리셋은 멀까?

3.7.2 System reset sources
Power-on reset initializes all registers while system reset reinitializes the system except for
the debug, part of the RCC and power controller status registers, as well as the backup
power domain.
A system reset is generated in the following cases:
• Power-on reset (pwr_por_rst)
• Brownout reset
• Low level on NRST pin (external reset)
• Independent watchdog 1 (from D1 domain)
• Independent watchdog 2 (from D2 domain)
• Window watchdog 1 (from D1 domain)
• Window watchdog 2 (from D2 domain)
• Software reset
• Low-power mode security reset
• Exit from Standby

[링크 :https://www.st.com/resource/en/datasheet/stm32h757ai.pdf]

 

stop / standby mode 오갈때 뜨는 듯?

A low-power-mode security reset (which is generated when Stop or Standby mode is entered but is prohibited by the option byte configuration)

[링크 : https://www.st.com/content/ccc/resource/training/technical/product_training/group0/81/96/f3/1a/55/d9/40/52/STM32H7-System-Reset_and_clock_control_RCC/files/STM32H7-System-Reset_and_clock_control_RCC.pdf/_jcr_content/translations/en.STM32H7-System-Reset_and_clock_control_RCC.pdf]

 

Posted by 구차니
embeded/Cortex-M3 STM2026. 1. 27. 17:08

startup_stm32f103retx.s

  .syntax unified
  .cpu cortex-m3
  .fpu softvfp
  .thumb

.global g_pfnVectors
.global Default_Handler

/**
 * @brief  This is the code that gets called when the processor first
 *          starts execution following a reset event. Only the absolutely
 *          necessary set is performed, after which the application
 *          supplied main() routine is called.
 * @param  None
 * @retval : None
*/

  .section .text.Reset_Handler
  .weak Reset_Handler
  .type Reset_Handler, %function
Reset_Handler:


/******************************************************************************
*
* The minimal vector table for a Cortex M3.  Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
******************************************************************************/
  .section .isr_vector,"a",%progbits
  .type g_pfnVectors%object
  .size g_pfnVectors, .-g_pfnVectors


g_pfnVectors:

  .word _estack
  .word Reset_Handler
  .word NMI_Handler
  .word HardFault_Handler
  .word MemManage_Handler
  .word BusFault_Handler
  .word UsageFault_Handler
  .word 0
  .word 0
  .word 0
  .word 0
  .word SVC_Handler
  .word DebugMon_Handler
  .word 0
  .word PendSV_Handler
  .word SysTick_Handler
  .word WWDG_IRQHandler
  .word PVD_IRQHandler
  .word TAMPER_IRQHandler
  .word RTC_IRQHandler
  .word FLASH_IRQHandler
  .word RCC_IRQHandler
  .word EXTI0_IRQHandler
  .word EXTI1_IRQHandler
  .word EXTI2_IRQHandler
  .word EXTI3_IRQHandler
  .word EXTI4_IRQHandler
  .word DMA1_Channel1_IRQHandler
  .word DMA1_Channel2_IRQHandler
  .word DMA1_Channel3_IRQHandler
  .word DMA1_Channel4_IRQHandler
  .word DMA1_Channel5_IRQHandler
  .word DMA1_Channel6_IRQHandler
  .word DMA1_Channel7_IRQHandler
  .word ADC1_2_IRQHandler
  .word USB_HP_CAN1_TX_IRQHandler
  .word USB_LP_CAN1_RX0_IRQHandler
  .word CAN1_RX1_IRQHandler
  .word CAN1_SCE_IRQHandler
  .word EXTI9_5_IRQHandler
  .word TIM1_BRK_IRQHandler
  .word TIM1_UP_IRQHandler
  .word TIM1_TRG_COM_IRQHandler
  .word TIM1_CC_IRQHandler
  .word TIM2_IRQHandler
  .word TIM3_IRQHandler
  .word TIM4_IRQHandler
  .word I2C1_EV_IRQHandler
  .word I2C1_ER_IRQHandler
  .word I2C2_EV_IRQHandler
  .word I2C2_ER_IRQHandler
  .word SPI1_IRQHandler
  .word SPI2_IRQHandler
  .word USART1_IRQHandler
  .word USART2_IRQHandler
  .word USART3_IRQHandler
  .word EXTI15_10_IRQHandler
  .word RTC_Alarm_IRQHandler
  .word USBWakeUp_IRQHandler
  .word TIM8_BRK_IRQHandler
  .word TIM8_UP_IRQHandler
  .word TIM8_TRG_COM_IRQHandler
  .word TIM8_CC_IRQHandler
  .word ADC3_IRQHandler
  .word FSMC_IRQHandler
  .word SDIO_IRQHandler
  .word TIM5_IRQHandler
  .word SPI3_IRQHandler
  .word UART4_IRQHandler
  .word UART5_IRQHandler
  .word TIM6_IRQHandler
  .word TIM7_IRQHandler
  .word DMA2_Channel1_IRQHandler
  .word DMA2_Channel2_IRQHandler
  .word DMA2_Channel3_IRQHandler
  .word DMA2_Channel4_5_IRQHandler
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word 0
  .word BootRAM       /* @0x1E0. This is for boot in RAM mode for
                         STM32F10x High Density devices. */

 

STM32F103RETX_FLASH.ld

/* Memories definition */
MEMORY
{
  RAM    (xrw)    : ORIGIN = 0x20000000,   LENGTH = 64K
  FLASH    (rx)    : ORIGIN = 0x8000000,   LENGTH = 512K
}

/* Sections */
SECTIONS
{
  /* The startup code into "FLASH" Rom type memory */
  .isr_vector :
  {
    . = ALIGN(4);
    KEEP(*(.isr_vector)) /* Startup code */
    . = ALIGN(4);
  } >FLASH

  /* The program code and other data into "FLASH" Rom type memory */
  .text :
  {
    . = ALIGN(4);
    *(.text)           /* .text sections (code) */
    *(.text*)          /* .text* sections (code) */
    *(.glue_7)         /* glue arm to thumb code */
    *(.glue_7t)        /* glue thumb to arm code */
    *(.eh_frame)

    KEEP (*(.init))
    KEEP (*(.fini))

    . = ALIGN(4);
    _etext = .;        /* define a global symbols at end of code */
  } >FLASH

  /* Constant data into "FLASH" Rom type memory */
  .rodata :
  {
    . = ALIGN(4);
    *(.rodata)         /* .rodata sections (constants, strings, etc.) */
    *(.rodata*)        /* .rodata* sections (constants, strings, etc.) */
    . = ALIGN(4);
  } >FLASH
}

 

$ readelf -a test.elf 
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8009499
  Start of program headers:          52 (bytes into file)
  Start of section headers:          1299152 (bytes into file)
  Flags:                             0x5000200, Version5 EABI, soft-float ABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         4
  Size of section headers:           40 (bytes)
  Number of section headers:         26
  Section header string table index: 25

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .isr_vector       PROGBITS        08000000 001000 0001e4 00   A  0   0  1
  [ 2] .text             PROGBITS        080001e8 0011e8 012144 00  AX  0   0  8
  [ 3] .rodata           PROGBITS        08012330 013330 002338 00   A  0   0  8
  [ 4] .ARM.extab        PROGBITS        08014668 01622c 000000 00   W  0   0  1
  [ 5] .ARM              ARM_EXIDX       08014668 015668 000008 00  AL  2   0  4
  [ 6] .preinit_array    PREINIT_ARRAY   08014670 01622c 000000 04  WA  0   0  1
  [ 7] .init_array       INIT_ARRAY      08014670 015670 000004 04   A  0   0  4
  [ 8] .fini_array       FINI_ARRAY      08014674 015674 000004 04   A  0   0  4
  [ 9] .data             PROGBITS        20000000 016000 00022c 00  WA  0   0  4
  [10] .bss              NOBITS          20000230 016230 001b44 00  WA  0   0  8
  [11] ._user_heap_stack NOBITS          20001d74 016d74 000604 00  WA  0   0  1
  [12] .ARM.attributes   ARM_ATTRIBUTES  00000000 01622c 000029 00      0   0  1
  [13] .debug_info       PROGBITS        00000000 016255 01da16 00      0   0  1
  [14] .debug_abbrev     PROGBITS        00000000 033c6b 0056f5 00      0   0  1
  [15] .debug_aranges    PROGBITS        00000000 039360 001bf8 00      0   0  8
  [16] .debug_rnglists   PROGBITS        00000000 03af58 0015ba 00      0   0  1
  [17] .debug_macro      PROGBITS        00000000 03c512 0206fd 00      0   0  1
  [18] .debug_line       PROGBITS        00000000 05cc0f 022fc5 00      0   0  1
  [19] .debug_str        PROGBITS        00000000 07fbd4 0aae1c 01  MS  0   0  1
  [20] .comment          PROGBITS        00000000 12a9f0 000043 01  MS  0   0  1
  [21] .debug_frame      PROGBITS        00000000 12aa34 008440 00      0   0  4
  [22] .debug_line_str   PROGBITS        00000000 132e74 000064 01  MS  0   0  1
  [23] .symtab           SYMTAB          00000000 132ed8 0072e0 10     24 1208  4
  [24] .strtab           STRTAB          00000000 13a1b8 002ffa 00      0   0  1
  [25] .shstrtab         STRTAB          00000000 13d1b2 00011c 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  D (mbind), y (purecode), p (processor specific)

There are no section groups in this file.

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x001000 0x08000000 0x08000000 0x14678 0x14678 R E 0x1000
  LOAD           0x016000 0x20000000 0x08014678 0x0022c 0x0022c RW  0x1000
  LOAD           0x000230 0x20000230 0x080148a4 0x00000 0x01b44 RW  0x1000
  LOAD           0x000d74 0x20001d74 0x080148a4 0x00000 0x00604 RW  0x1000

 Section to Segment mapping:
  Segment Sections...
   00     .isr_vector .text .rodata .ARM .init_array .fini_array 
   01     .data 
   02     .bss 
   03     ._user_heap_stack 

There is no dynamic section in this file.

There are no relocations in this file.

Unwind section '.ARM' at offset 0x15668 contains 1 entry:

0x8000228 <strlen>: 0x1 [cantunwind]


Symbol table '.symtab' contains 1838 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 08000000     0 SECTION LOCAL  DEFAULT    1 .isr_vector
     2: 080001e8     0 SECTION LOCAL  DEFAULT    2 .text
     3: 08012330     0 SECTION LOCAL  DEFAULT    3 .rodata
     4: 08014668     0 SECTION LOCAL  DEFAULT    4 .ARM.extab
     5: 08014668     0 SECTION LOCAL  DEFAULT    5 .ARM
     6: 08014670     0 SECTION LOCAL  DEFAULT    6 .preinit_array
     7: 08014670     0 SECTION LOCAL  DEFAULT    7 .init_array
     8: 08014674     0 SECTION LOCAL  DEFAULT    8 .fini_array
     9: 20000000     0 SECTION LOCAL  DEFAULT    9 .data
    10: 20000230     0 SECTION LOCAL  DEFAULT   10 .bss
    11: 20001d74     0 SECTION LOCAL  DEFAULT   11 ._user_heap_stack
(많아서 생략)

No version information found in this file.
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-M"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Microcontroller
  Tag_THUMB_ISA_use: Thumb-2
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: small
  Tag_CPU_unaligned_access: v6

 

 

[링크 : https://hackmd.io/@SgyGB0h2QGWBfbHp9n_ArQ/BygAD3fU_]

 

플래시를 읽어보면 

0x8000000 은 _estack 값 같고

0x8000004 는 Reset_Handler의 주소 같다. 그런데 왜 1로 끝나지..? 4바이트 정렬 안하나?

 

근처에 읽어보면 모르겠...다(!)

 

NMI_Handler로 보는데 0x0800 7F01 인데 왜 1로 끝나냐도 모르겠고, 본다고 기계어가 어셈으로 눈에 들어오는것도 아니고..

[링크 : https://fuhehe.tistory.com/13]

 

벡터위치 변경하는 것을 요약하면 



1. 링커스크립트에서 인터럽트벡터가 있는 .isr_vector 섹션의 위치를 수정

2. SystemInit() 함수에서 SCB->VTOR 레지스터를 변경하고자 하는 섹션의 위치로 수정

[링크 : https://m.blog.naver.com/chcbaram/222580261732]

 

암튼 object는 굳이 표현하면 array 나 variable 이라는데

딱히 pointer라는 개념이.. 어셈에 없을리가 없는데 멀까.

For ELF targets, the .type directive is used like this:

.type name , type description
This sets the type of symbol name to be either a function symbol or an object symbol. There are five different syntaxes supported for the type description field, in order to provide compatibility with various other assemblers.

Because some of the characters used in these syntaxes (such as ‘@’ and ‘#’) are comment characters for some architectures, some of the syntaxes below do not work on all architectures. The first variant will be accepted by the GNU assembler on all architectures so that variant should be used for maximum portability, if you do not need to assemble your code with other assemblers.

The syntaxes supported are:

  .type <name> STT_<TYPE_IN_UPPER_CASE>
  .type <name>,#<type>
  .type <name>,@<type>
  .type <name>,%<type>
  .type <name>,"<type>"
The types supported are:

STT_FUNC
function
Mark the symbol as being a function name.

STT_GNU_IFUNC
gnu_indirect_function
Mark the symbol as an indirect function when evaluated during reloc processing. (This is only supported on assemblers targeting GNU systems).

STT_OBJECT
object
Mark the symbol as being a data object.

[링크 : https://sourceware.org/binutils/docs/as/Type.html?utm_source=chatgpt.com]

 

The .type directive allows you to tell the assembler what type a symbol is. Most of the time we just use %function and %object.

                    .type               hexTable,%object

...or...

                    .type               qsort,%function

[링크 : https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/useful-assembler-directives-and-macros-for-the-gnu-assembler]

[링크 : https://stackoverflow.com/questions/70061418/what-does-the-object-and-object-mean-in-this-inline-assembly?utm_source=chatgpt.com]

Posted by 구차니

cpu-z 에서 메모리 타이밍 테이블을 보면, 4개만 있어서 다른 클럭은 안되나 싶었는데

 

하단의 Tools - Save Report as .TXT 해서 저장하고 보면

 

다음과 같이 JEDEC # 으로 해서 전체가 나온다.

최소한 슬라이드 해서 전체를 보여주면 더 좋았을걸 아쉽네

Memory SPD
-------------------------------------------------------------------------

DIMM # 1
SMBus address 0x50
Memory type DDR4
Module format SO-DIMM
Module Manufacturer(ID) SK Hynix (AD00000000000000000000000000)
SDRAM Manufacturer (ID) SK Hynix (AD00000000000000000000000000)
Size 8192 MBytes
Max bandwidth DDR4-2133 (1066 MHz)
Part number HMA41GS6AFR8N-TF    
Serial number 2719C256
Manufacturing date Week 25/Year 16
Nominal Voltage 1.20 Volts
EPP no
XMP no
AMP no
EXPO no
JEDEC timings table CL-tRCD-tRP-tRAS-tRC @ frequency
JEDEC #1 9.0-9-9-22-31 @ 666 MHz
JEDEC #2 11.0-11-11-27-38 @ 800 MHz
JEDEC #3 12.0-13-13-30-42 @ 900 MHz
JEDEC #4 13.0-14-14-32-45 @ 966 MHz
JEDEC #5 14.0-14-14-35-49 @ 1033 MHz
JEDEC #6 15.0-15-15-36-50 @ 1066 MHz
JEDEC #7 16.0-15-15-36-50 @ 1066 MHz

DIMM # 1
SPD registers
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 
00 23 11 0C 03 84 19 00 08 00 40 00 03 09 03 00 00 
10 00 00 08 0D F4 03 00 00 6C 6C 6C 11 08 74 20 08 
20 00 05 70 03 00 A8 1E 2B 2E 00 78 00 14 3C 00 00 
30 00 00 00 00 00 00 00 00 00 00 00 00 2D 0E 0B 2C 
40 2E 04 0B 35 00 00 16 2B 2D 0E 15 35 24 0E 00 00 
50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
70 00 00 00 00 00 86 B5 CE 00 00 00 00 E7 C1 DD CE 
80 0F 11 04 01 00 00 00 00 00 00 00 00 00 00 00 00 
90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF DB 
100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
140 80 AD 01 16 25 27 19 C2 56 48 4D 41 34 31 47 53 
150 36 41 46 52 38 4E 2D 54 46 20 20 20 20 00 80 AD 
160 FF 57 56 36 36 4E 30 35 35 39 32 30 33 00 00 00 
170 01 00 00 00 00 00 00 01 00 00 00 00 00 DD 00 00 
180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
1A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
1B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
1C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
1D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
1E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
1F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 

 

심심해서 만들어 본 표. DDR4 메모리 클럭 범위가 의외로 어마어마하게 넓네?

MT/s MHz bandwidth
1600 800 12800
1800 900 14400
1932 966 15456
2066 1033 16528
     
2133 1066.5 17064
2400 1200 19200
2666 1333 21328
2933 1466.5 23464
3000 1500 24000
3200 1600 25600
3600 1800 28800
4000 2000 32000
4133 2066.5 33064
     
4200 1033 33600

'이론 관련 > 컴퓨터 관련' 카테고리의 다른 글

mPCIe pinout usb  (0) 2026.01.21
usb cdc acm(Abstract Control Model)  (0) 2026.01.08
pc 쿨링팬 pwm 주파수  (0) 2025.12.01
bit banging  (0) 2025.05.08
numa 와 smp  (0) 2025.05.07
Posted by 구차니
Linux2026. 1. 27. 14:01

일단 내 노트북에서는 온보드라서 그런가 확인에 실패

 

$ sudo modprobe eeprom
modprobe: FATAL: Module eeprom not found in directory /lib/modules/6.8.0-90-generic

$ sudo modprobe at24
$ decode-dimms
명령어 'decode-dimms' 을(를) 찾을 수 없습니다. 그러나 다음을 통해 설치할 수 있습니다:
sudo apt install i2c-tools

$ decode-dimms
No EEPROM found, the kernel probably does not support your hardware.

 

$ sudo dmidecode -t
dmidecode: option requires an argument -- 't'
Type number or keyword expected
Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot

$ sudo dmidecode -t memory
# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.2.0 present.

Handle 0x0013, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Error Information Handle: Not Provided
Number Of Devices: 2

Handle 0x0014, DMI type 17, 84 bytes
Memory Device
Array Handle: 0x0013
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: Other
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR4
Type Detail: Synchronous
Speed: 2667 MT/s
Manufacturer: Samsung
Serial Number: 00000000
Asset Tag: 9876543210
Part Number: M471A1G44AB0-CTD    
Rank: 1
Configured Memory Speed: 2667 MT/s
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V
Memory Technology: DRAM
Memory Operating Mode Capability: Volatile memory
Firmware Version: Not Specified
Module Manufacturer ID: Bank 1, Hex 0xCE
Module Product ID: Unknown
Memory Subsystem Controller Manufacturer ID: Unknown
Memory Subsystem Controller Product ID: Unknown
Non-Volatile Size: None
Volatile Size: 8 GB
Cache Size: None
Logical Size: None

Handle 0x0015, DMI type 17, 84 bytes
Memory Device
Array Handle: 0x0013
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: Other
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR4
Type Detail: Synchronous
Speed: 2667 MT/s
Manufacturer: Samsung
Serial Number: 00000000
Asset Tag: 9876543210
Part Number: M471A1G44AB0-CTD    
Rank: 1
Configured Memory Speed: 2667 MT/s
Minimum Voltage: 1.2 V
Maximum Voltage: 1.2 V
Configured Voltage: 1.2 V
Memory Technology: DRAM
Memory Operating Mode Capability: Volatile memory
Firmware Version: Not Specified
Module Manufacturer ID: Bank 1, Hex 0xCE
Module Product ID: Unknown
Memory Subsystem Controller Manufacturer ID: Unknown
Memory Subsystem Controller Product ID: Unknown
Non-Volatile Size: None
Volatile Size: 8 GB
Cache Size: None
Logical Size: None

 

$ sudo lshw -C memory
  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: P07RFG.042.201224.FL
       date: 12/24/2020
       size: 64KiB
       capacity: 16MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int14serial int17printer acpi usb biosbootspecification uefi
  *-memory
       description: System Memory
       physical id: 13
       slot: System board or motherboard
       size: 16GiB
     *-bank:0
          description: Project-Id-Version: lshwReport-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>PO-Revision-Date: 2017-08-19 08:42+0000Last-Translator: Gunwoo Kim <Unknown>Language-Team: Korean <ko@li.org>MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Launchpad-Export-Date: 2024-09-02 19:29+0000X-Generator: Launchpad (build 1b1ed1ad2dbfc71ee62b5c5491c975135a771bf0) DDR4 동기 2667 MHz (0.4 ns)
          product: M471A1G44AB0-CTD
          vendor: Samsung
          physical id: 0
          serial: 00000000
          slot: ChannelA-DIMM0
          size: 8GiB
          width: 64 bits
          clock: 2667MHz (0.4ns)
     *-bank:1
          description: Project-Id-Version: lshwReport-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>PO-Revision-Date: 2017-08-19 08:42+0000Last-Translator: Gunwoo Kim <Unknown>Language-Team: Korean <ko@li.org>MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Launchpad-Export-Date: 2024-09-02 19:29+0000X-Generator: Launchpad (build 1b1ed1ad2dbfc71ee62b5c5491c975135a771bf0) DDR4 동기 2667 MHz (0.4 ns)
          product: M471A1G44AB0-CTD
          vendor: Samsung
          physical id: 1
          serial: 00000000
          slot: ChannelB-DIMM0
          size: 8GiB
          width: 64 bits
          clock: 2667MHz (0.4ns)
  *-cache:0
       description: L1 캐시
       physical id: 1f
       slot: L1 Cache
       size: 256KiB
       capacity: 256KiB
       capabilities: synchronous internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 캐시
       physical id: 20
       slot: L2 Cache
       size: 1MiB
       capacity: 1MiB
       capabilities: synchronous internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 캐시
       physical id: 21
       slot: L3 Cache
       size: 8MiB
       capacity: 8MiB
       capabilities: synchronous internal write-back unified
       configuration: level=3
  *-memory UNCLAIMED
       description: RAM memory
       product: Comet Lake PCH-LP Shared SRAM
       vendor: Intel Corporation
       physical id: 14.2
       bus info: pci@0000:00:14.2
       version: 00
       width: 64 bits
       clock: 33MHz (30.3ns)
       capabilities: pm cap_list
       configuration: latency=0
       resources: memory:b1220000-b1221fff memory:b1229000-b1229fff

 

[링크 : https://superuser.com/questions/519822/how-to-check-ram-timings-in-linux]

'Linux' 카테고리의 다른 글

journalctl 옵션  (0) 2026.01.20
proc fs smp_affinity  (0) 2025.09.19
sudo time  (0) 2025.09.17
dd 로 덤프 하면서 바로 압축하기  (0) 2025.07.24
gpiod - gpiomon  (0) 2025.07.17
Posted by 구차니
embeded/Cortex-M3 STM2026. 1. 27. 11:35

USB 에서 장치를 다시 인식시키려면, D+ 라인을 풀다운 해주어야 한다고 한다.

그래서 reset 누르고 재기동 하면 ACM이 살아는 있지만 정상적으로 작동을 하지 않는건가?

If you reset the bluepill you need to pull down the D+ line for several milliseconds to let know the host that it has to start the enumeration process.

[링크 : https://stackoverflow.com/questions/54939948/stm32-usb-cdc-after-hardware-reset]

 

USB_DEVICE/App/usb_device.c 에 있는 MX_USB_DEVICE_Init() 을 아래와 같이 추가해준다.

그러면 일정 시간 이후에 다시 붙으면서 /dev/ttyACM0로 데이터가 출력된다.

void MX_USB_DEVICE_Init(void)
{
  /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */

  /* Rendering hardware reset harmless (no need to replug USB cable): */
  GPIO_InitTypeDef GPIO_InitStruct = {0};

  /* GPIO Ports Clock Enable */
  __HAL_RCC_GPIOA_CLK_ENABLE();

  /*Configure GPIO pin Output Level */
  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);

  /*Configure GPIO pin : PA12, a.k.a. USB_DP */
  GPIO_InitStruct.Pin = GPIO_PIN_12;
  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
  GPIO_InitStruct.Pull = GPIO_NOPULL;
  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

  HAL_Delay(5);
  /* Hardware reset rendered harmless! */

  /* USER CODE END USB_DEVICE_Init_PreTreatment */
  ...
}

[링크 : https://stackoverflow.com/questions/54939948/stm32-usb-cdc-after-hardware-reset]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 hal rcc flag  (0) 2026.01.27
stm32 ivt  (0) 2026.01.27
stm32cubeide 2.0 에서 ioc 파일이 생성 안되네?  (0) 2026.01.11
stm32cubeide에 x-cube-ai 설치  (0) 2026.01.06
stm32f103c9t6(bluepill) + stlinkv2 + cdc(vcp)  (0) 2026.01.05
Posted by 구차니
개소리 왈왈/블로그2026. 1. 26. 14:28

오늘 접속했더니 대시보드 상단에 똭~!

 

솔찍히 동영상 올리는게 불편해서(추가 로그인 필요하니까) 잘 안쓰긴 하는데,

그럼에도 불구하고 올려둔 걸 없애기 까지 하는건 너무 심하지 않나?

그럼 일단 백업하고 나서는 유튜브 쓰란건가? 어떻게 하란거지????!?!

 

전체글 1% 수준이라 어쩌구저쩌구 일정 기간 이후 삭제

그 일정기간이 26년 3월 24일 일괄삭제

[사전 안내] 동영상 업로드 기능 조정 예정

TISTORY 2026. 1. 20. 15:33
안녕하세요. 티스토리팀입니다.
항상 티스토리를 이용해 주셔서 감사합니다.
티스토리의 동영상 직접 업로드 기능은 전체 글 중 약 1% 수준으로 이용되고 있어, 사용 빈도는 매우 제한적인 편입니다.
반면 동영상 업로드 기능은 안정적인 저장과 전송을 위해 비교적 많은 운영 자원이 필요한 기능이기도 합니다.
티스토리는 글쓰기와 소통 등 더 많은 이용자분들이 활용하시는 기능을 보다 안정적으로 개선하기 위해, 블로그에 동영상 파일을 직접 업로드하는 기능을 점진적으로 정리할 예정입니다. 이에 따라 동영상 신규 업로드가 중단되며, 기존에 업로드된 동영상은 일정 기간 이후 삭제됩니다.
앞으로는 티스토리에서 동영상 파일을 직접 업로드하는 방식 대신, 유튜브 등 외부 동영상 플랫폼을 활용하는 방식으로 운영이 변경됩니다.
아래에서 변경 내용과 이용 방법을 FAQ 형식으로 안내드립니다.

자주 묻는 질문

Q. 무엇이 달라지나요?
A. 티스토리에서 동영상 파일을 직접 업로드하는 기능이 종료됩니다. 외부 플랫폼 영상은 그대로 이용하실 수 있습니다.

 
Q. 유튜브 영상도 삭제되나요?
A. 아닙니다. 유튜브 등 외부 플랫폼에서 링크하거나 임베드한 영상은 이번 조정 대상이 아니며, 기존과 동일하게 재생됩니다.

 
Q. 기존에 올린 동영상은 어떻게 되나요?
A. 바로 삭제되지 않으며, 2026년 3월 23일에 일괄 삭제될 예정입니다. 삭제 전까지 백업이 가능합니다.

 
Q. 동영상 신규 업로드는 언제부터 중단되나요?
A. 2026년 2월 23일부터 웹 에디터에서 동영상 파일을 새로 업로드할 수 없습니다.

 
Q. 꼭 기억해야 할 점이 있나요?
A. 기존에 업로드한 동영상은 삭제 예정일 이전까지 반드시 백업해 주시기 바랍니다.

 
Q. 동영상은 어떻게 백업하나요?
A. 관리 메뉴에서
블로그 → 데이터 관리하기 → 동영상 다운로드 → 다운로드
순서로 이동하시면, 기존에 업로드한 동영상을 확인하고 내려받을 수 있습니다.

 
Q. 앞으로는 어떻게 영상을 넣으면 되나요?
A. 유튜브 등 외부 플랫폼에 영상 업로드 후, 영상 주소(URL) 복사하여 넣으면 됩니다.
외부 플랫폼의 재생 기능과 옵션을 그대로 활용하실 수 있습니다.

 
Q. 왜 이런 조정을 하나요?
A. 동영상 직접 업로드 이용 비중 전체글의 1%로 사용량이 낮은 반면, 안정적인 저장과 전송에 많은 자원이 필요합니다. 이를 통해 글쓰기와 소통 등 더 많은 이용자분들이 사용하는 기능을 안정적으로 개선하고자 합니다.

[링크 : https://notice.tistory.com/2696]

 

+

대충 80개 있는것 같은데 이거 다 받으려면 80번의  capcha를 통과하고 해야하나? ㅎㄷㄷ 한번에 받기 해줘야지!

'개소리 왈왈 > 블로그' 카테고리의 다른 글

도메인 연장비용 인상  (4) 2025.12.11
중고나라 계정도용 피싱시도 방어  (0) 2025.12.09
x도 털렸나..  (0) 2025.12.07
엥 갑자기 머지?  (2) 2025.11.12
오랫만에 글 정리  (0) 2025.11.03
Posted by 구차니
프로그램 사용/lvgl2026. 1. 26. 14:07

main() 에서 

xTaskCreate()를 통해 쓰레드를 여러개 생성하여 돌리는 컨셉

 

sleep() 으로 cpu를 차지하는게 아니라

vTaskDelay()를 이용하여 다른 태스크에게 넘겨줘서 처리한다.

[링크 : https://fishpoint.tistory.com/12257]

 

esp32 esp-idf에 포팅된 엔트리 포인트가 app_main() 인가?

그리고  xTaskCreate는 없고 xTaskCreatePinnedToCore()라는 함수를 쓰는데

특정 core 에서 돌리게 하는 일종의 affinity 제한 쓰레드 생성 함수라고 하면 되려나?

// 主函数
void app_main() {
printf("\r\nAPP %s is start!~\r\n", TAG);
vTaskDelay(1000 / portTICK_PERIOD_MS);
// 如果要使用任务创建图形,则需要创建固定核心任务,否则可能会出现诸如内存损坏等问题
// 创建一个固定到其中一个核心的FreeRTOS任务,选择核心1
xTaskCreatePinnedToCore(guiTask, "gui", 4096*2, NULL, 0, NULL, 1);
}

void guiTask(void *pvParameter) {
    
    (void) pvParameter;
    xGuiSemaphore = xSemaphoreCreateMutex();    // 创建GUI信号量
    lv_init();          // 初始化LittlevGL
    lvgl_driver_init(); // 初始化液晶SPI驱动 触摸芯片SPI/IIC驱动

    static lv_color_t buf1[DISP_BUF_SIZE];
#ifndef CONFIG_LVGL_TFT_DISPLAY_MONOCHROME
    static lv_color_t buf2[DISP_BUF_SIZE];
#endif
    static lv_disp_buf_t disp_buf;

    uint32_t size_in_px = DISP_BUF_SIZE;

#if defined CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_IL3820 
    /* Actual size in pixel, not bytes and use single buffer */
    size_in_px *= 8;
    lv_disp_buf_init(&disp_buf, buf1, NULL, size_in_px);
#elif defined CONFIG_LVGL_TFT_DISPLAY_MONOCHROME
    lv_disp_buf_init(&disp_buf, buf1, NULL, size_in_px);
#else
    lv_disp_buf_init(&disp_buf, buf1, buf2, size_in_px);
#endif

    lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&disp_drv);
    disp_drv.flush_cb = disp_driver_flush;

// 如果配置为 单色模式
#ifdef CONFIG_LVGL_TFT_DISPLAY_MONOCHROME
    disp_drv.rounder_cb = disp_driver_rounder;
    disp_drv.set_px_cb = disp_driver_set_px;
#endif

    disp_drv.buffer = &disp_buf;
    lv_disp_drv_register(&disp_drv);


// 如果有配置触摸芯片,配置触摸
#if CONFIG_LVGL_TOUCH_CONTROLLER != TOUCH_CONTROLLER_NONE
    lv_indev_drv_t indev_drv;
    lv_indev_drv_init(&indev_drv);
    indev_drv.read_cb = touch_driver_read;
    indev_drv.type = LV_INDEV_TYPE_POINTER;
    lv_indev_drv_register(&indev_drv);
#endif


    const esp_timer_create_args_t periodic_timer_args = {
        .callback = &lv_tick_task,
        .name = "periodic_gui"
    };
    esp_timer_handle_t periodic_timer;
    ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));
    ESP_ERROR_CHECK(esp_timer_start_periodic(periodic_timer, LV_TICK_PERIOD_MS * 1000));

    // 一个标签演示
    //lv_obj_t * scr = lv_disp_get_scr_act(NULL);         // 获取当前屏幕
    //lv_obj_t * label1 =  lv_label_create(scr, NULL);    // 在当前活动的屏幕上创建标签
    //lv_label_set_text(label1, "Hello\nworld!");         // 修改标签的文字
    // 对象对齐函数,将标签中心对齐,NULL表示在父级上对齐,当前父级是屏幕,0,0表示对齐后的x,y偏移量
    //lv_obj_align(label1, NULL, LV_ALIGN_CENTER, 0, 0);
/*
lv_indev_t * mouse_indev = lv_indev_drv_register(&indev_drv);
lv_obj_t * cursor_obj =  lv_img_create(lv_scr_act(), NULL); //Create an image object for the cursor 
lv_img_set_src(cursor_obj, &mouse_cursor_icon);             //Set the image source
lv_indev_set_cursor(mouse_indev, cursor_obj);               //Connect the image  object to the driver
*/
lv_demo_widgets();

    while (1) {
vTaskDelay(1);
// 尝试锁定信号量,如果成功,请调用lvgl的东西
if (xSemaphoreTake(xGuiSemaphore, (TickType_t)10) == pdTRUE) {
            lv_task_handler();
            xSemaphoreGive(xGuiSemaphore);  // 释放信号量
        }
    }
    vTaskDelete(NULL);      // 删除任务
}

 

esp-idf 4.3 사용중인데, xTaskCreate가 없다?

BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
const char * const pcName,
const uint32_t usStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pvCreatedTask,
const BaseType_t xCoreID)

xTaskCreatePinnedToCore                           esp-idf/freertos/libfreertos.a(tasks.c.obj)
                                                  esp-idf/esp_ipc/libesp_ipc.a(ipc.c.obj)
                                                  esp-idf/main/libmain.a(main.c.obj)
                                                  esp-idf/freertos/libfreertos.a(port_common.c.obj)
                                                  esp-idf/esp_timer/libesp_timer.a(esp_timer.c.obj)
                                                  esp-idf/esp32/libesp32.a(dport_access.c.obj)
                                                  esp-idf/pthread/libpthread.a(pthread.c.obj)
xTaskCreateRestricted                             esp-idf/freertos/libfreertos.a(tasks.c.obj)
xTaskCreateRestrictedStatic                       esp-idf/freertos/libfreertos.a(tasks.c.obj)
xTaskCreateStaticPinnedToCore                     esp-idf/freertos/libfreertos.a(tasks.c.obj)

 

코드가 어느 코어에서 실행되고 있는가를 확인하려면 xPortGetCoreID() 함수를 사용하면 된다.


xTaskCreatePinnedToCore (
  Task1code,      // 태스크를 구현한 함수
  “Task1”,        // 태스크 이름
  10000,          // 스택 크기 (word단위)
  NULL,           // 태스크 파라미터
  0,              // 태스크 우선순위
  &Task1,         // 태스크 핸들
  0 );            // 태스크가 실행될 코어

[링크 : https://arsviator.blogspot.com/2019/04/esp32-use-multicore-on-esp32.html]

[링크 : https://www.reddit.com/r/esp32/comments/vk66d8/what_is_difference_between/?tl=ko]

'프로그램 사용 > lvgl' 카테고리의 다른 글

lvgl pro on win10 실패  (0) 2026.01.22
lvgl pro, square line studio  (0) 2026.01.09
esp32 lvgl  (0) 2025.11.15
LVGL (Light and Versatile Graphics Library)  (0) 2023.11.18
Posted by 구차니
파일방2026. 1. 25. 22:35

데몬 필요없이 docker와도 명령어 레벨에서 어느정도 호환이 되는것 같긴한데

[링크 : https://servermon.tistory.com/847]

 

윈도우에서는 WSLv2가 필요 하다는데, 의외로 데비안 계열에도 이미 포함되어 있는걸 보면 유명한듯?

Windows
On Windows, each Podman machine is backed by a virtualized Windows Subsystem for Linux (WSLv2) distribution. Once installed, the podman command can be run directly from your Windows PowerShell (or CMD) prompt, where it remotely communicates with the podman service running in the WSL environment. Alternatively, you can access Podman directly from the WSL instance if you prefer a Linux prompt and Linux tooling.

See the Podman for Windows guide for setup and usage instructions.


Debian
The podman package is available in the Debian 11 (Bullseye) repositories and later.

sudo apt-get -y install podman

[링크 : https://podman.io/docs/installation]

[링크 : https://podman.io/]

'파일방' 카테고리의 다른 글

elinks  (0) 2026.01.20
platformio  (0) 2026.01.17
directFB2  (0) 2026.01.09
nanoVG  (0) 2026.01.09
popos  (0) 2025.09.03
Posted by 구차니
게임/doom2026. 1. 24. 22:21

결국에 보스는 센티널 방어구 입고 겨우 잡음 ㅠㅠ

어우 30시간..

 

 

 

잼민 펀치!

 

 

 

 

죄악의 상징 31.9% 완료

엔딩을 본 사람이 1/3도 안된다는거네?

Posted by 구차니
embeded/esp322026. 1. 23. 15:54

데이터 시트 상으로는 MX MT 값이 제법 중요해보이는데 MX,MY 값이 안보인다 -_-

[링크 : https://cdn-shop.adafruit.com/datasheets/ILI9341.pdf]

 

BGR은 되는것 같고..

데이터 순서는 동일할텐데 화면을 뒤집으려면

ML / MH만 뒤집어야 하나?

-------

MAC - 0x48

초기값으로 설정된거

 

MAC - 0x00 (landscape + rgb)

 

MAC - 0x08 (landscape + bgr)

 

MAC - 0xC8 (landscape)

MX,MY를 설정해서 데이터 방향을 바꾸어서 180도 rotate

 

MAC - 0x28

portrait를 위해 MV(Row/Column Exchange)

 

MAC - 0x68 (portrait) - 0110 1000 (2)

Portrait 되니 좌우가 바뀌어서 이를 위해 MX(Column Address Order) 뒤집음

 


MAC - 0xA8 (portait invert + bgr) - 1010 1000 (2)

landscape 처럼 방향 뒤집으려면 MX/MY를 뒤집음

 

아래는 부팅 로그(참조용)

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6992
load:0x40078000,len:14292
ho 0 tail 12 room 4
load:0x40080400,len:3688
entry 0x40080678
I (29) boot: ESP-IDF v4.3 2nd stage bootloader
I (29) boot: compile time 14:34:09
I (29) boot: chip revision: 3
I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (43) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (91) boot: End of partition table
I (95) boot_comm: chip revision: 3, min. application chip revision: 0
I (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0e41ch ( 58396) map
I (133) esp_image: segment 1: paddr=0001e444 vaddr=3ffb0000 size=01bd4h (  7124) load
I (136) esp_image: segment 2: paddr=00020020 vaddr=400d0020 size=47344h (291652) map
I (249) esp_image: segment 3: paddr=0006736c vaddr=3ffb1bd4 size=00ec8h (  3784) load
I (251) esp_image: segment 4: paddr=0006823c vaddr=40080000 size=0c740h ( 51008) load
I (277) esp_image: segment 5: paddr=00074984 vaddr=50000000 size=00010h (    16) load
I (284) boot: Loaded app from partition at offset 0x10000
I (284) boot: Disabling RNG early entropy source...
I (297) cpu_start: Pro cpu up.
I (297) cpu_start: Starting app cpu, entry point is 0x40081160
I (0) cpu_start: App cpu up.
I (313) cpu_start: Pro cpu start user code
I (313) cpu_start: cpu freq: 160000000
I (313) cpu_start: Application information:
I (318) cpu_start: Project name:     lvgl-demo
I (323) cpu_start: App version:      1
I (327) cpu_start: ELF file SHA256:  af171cc858421945...
I (333) cpu_start: ESP-IDF:          v4.3
I (338) heap_init: Initializing. RAM available for dynamic allocation:
I (345) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (351) heap_init: At 3FFCFB50 len 000104B0 (65 KiB): DRAM
I (357) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (364) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (370) heap_init: At 4008C740 len 000138C0 (78 KiB): IRAM
I (377) spi_flash: detected chip: generic
I (381) spi_flash: flash io: dio
W (385) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (399) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

APP  LittlevGL Demo is start!~
lvgl_helpers->Display hor size: 320, ver size: 240
lvgl_helpers->Display buffer size: 20480
lvgl_helpers->Initializing SPI master for display
lvgl_helpers->Configuring SPI host HSPI_HOST (1)
lvgl_helpers->MISO pin: -1, MOSI pin: 13, SCLK pin: 14
lvgl_helpers->Max transfer size: 40960 (bytes)
lvgl_helpers->Initializing SPI bus...
disp_spi->Adding SPI device
disp_spi->Clock speed: 40000000Hz, mode: 0, CS pin: 15
ILI9341->ili9341 Initialization....
I (1440) ILI9341: Enabling backlight.
ILI9341->Display orientation: PORTRAIT
ILI9341->0x36 command value: 0x48
lvgl_helpers->Initializing SPI master for touch
I (1440) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (1460) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (1460) XPT2046: XPT2046 Initialization

 

 

+

ili9341.c

static void ili9341_set_orientation(uint8_t orientation)
{
// ESP_ASSERT(orientation < 4);
const char *orientation_str[] = {"PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED"};
printf("%s->Display orientation: %s\n",TAG, orientation_str[orientation]);
#if defined CONFIG_LVGL_PREDEFINED_DISPLAY_M5STACK
uint8_t data[] = {0x68, 0x68, 0x08, 0x08};
#elif defined (CONFIG_LVGL_PREDEFINED_DISPLAY_WROVER4)
uint8_t data[] = {0x4C, 0x88, 0x28, 0xE8};
#elif defined (CONFIG_LVGL_PREDEFINED_DISPLAY_NONE)
uint8_t data[] = {0x68, 0xA8, 0x08, 0xC8};
#endif
printf("%s->0x36 command value: 0x%02X\n",TAG, data[orientation]);
ili9341_send_cmd(0x36);
ili9341_send_data((void *) &data[orientation], 1);
}

 

sdkconfig

width / height는 320,240 으로 하고 돌리며 된다.

다만 터치는 소스 수정이 좀 많이 필요할 듯.


#
# LVGL TFT Display controller
#
CONFIG_LVGL_PREDEFINED_DISPLAY_NONE=y
# CONFIG_LVGL_PREDEFINED_DISPLAY_WROVER4 is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_M5STACK is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_M5STICK is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_M5STICKC is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_ERTFT0356 is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_ADA_FEATHERWING is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_RPI_MPI3501 is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_WEMOS_LOLIN is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_ATAG is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_RPI_RA8875 is not set
# CONFIG_LVGL_PREDEFINED_DISPLAY_TTGO is not set
CONFIG_LVGL_TFT_DISPLAY_CONTROLLER_ILI9341=y
CONFIG_LVGL_TFT_DISPLAY_PROTOCOL_SPI=y
CONFIG_LVGL_PREDEFINED_PINS_NONE=y
# CONFIG_LVGL_PREDEFINED_PINS_38V4 is not set
# CONFIG_LVGL_PREDEFINED_PINS_30 is not set
# CONFIG_LVGL_PREDEFINED_PINS_38V1 is not set
# CONFIG_LVGL_PREDEFINED_PINS_TKOALA is not set
CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_ILI9341=y
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_ILI9481 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_ILI9486 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_ILI9488 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_ST7789 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_ST7735S is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_HX8357 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_SH1107 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_SSD1306 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_FT81X is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_IL3820 is not set
# CONFIG_LVGL_TFT_DISPLAY_USER_CONTROLLER_RA8875 is not set
CONFIG_LVGL_TFT_DISPLAY_SPI_HSPI=y
# CONFIG_LVGL_TFT_DISPLAY_SPI_VSPI is not set
CONFIG_LVGL_DISPLAY_ORIENTATION_PORTRAIT=y
# CONFIG_LVGL_DISPLAY_ORIENTATION_PORTRAIT_INVERTED is not set
# CONFIG_LVGL_DISPLAY_ORIENTATION_LANDSCAPE is not set
# CONFIG_LVGL_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED is not set
CONFIG_LVGL_DISPLAY_ORIENTATION=0
CONFIG_LVGL_DISPLAY_WIDTH=320
CONFIG_LVGL_DISPLAY_HEIGHT=240
CONFIG_LVGL_TFT_USE_CUSTOM_SPI_CLK_DIVIDER=y
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_1 is not set
CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_2=y
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_3 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_4 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_5 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_6 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_7 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_8 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_9 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_10 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_12 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_16 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_20 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_24 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_32 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_40 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_48 is not set
# CONFIG_LVGL_TFT_SPI_CLK_DIVIDER_80 is not set
CONFIG_LVGL_TFT_CUSTOM_SPI_CLK_DIVIDER=2
# CONFIG_LVGL_INVERT_DISPLAY is not set
# CONFIG_LVGL_INVERT_COLORS is not set
CONFIG_LVGL_AXP192_PIN_SDA=21
CONFIG_LVGL_AXP192_PIN_SCL=22

'embeded > esp32' 카테고리의 다른 글

esp32-wroom-32 보드 / arduino 개발툴  (0) 2026.01.23
esp32-2432S028 데모 빌드  (0) 2026.01.21
esp32-2432S028 데이터 시트  (0) 2026.01.17
esp32-2432S028 보드 st7789 spi lcd driver?  (0) 2026.01.16
esp32 와 spi lcd 성능 비..교?  (0) 2026.01.12
Posted by 구차니