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 구차니
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 구차니
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 구차니
embeded/esp322026. 1. 23. 15:22

원인은 모르겠으나 3.3.5 로 하면 빌드하다가 쉘에서 어쩌구 하면서 에러가 난다.

경고: 라이브러리 ESP_SR에서 카테고리 'Sound'가 유효하지 않습니다. 'Uncategorized'로 설정
경고: 라이브러리 Hash에서 카테고리 'Security'가 유효하지 않습니다. 'Uncategorized'로 설정
경고: 라이브러리 ESP Insights에서 카테고리 ''가 유효하지 않습니다. 'Uncategorized'로 설정
경고: 라이브러리 ESP RainMaker에서 카테고리 ''가 유효하지 않습니다. 'Uncategorized'로 설정
경고: 라이브러리 TFLite Micro에서 카테고리 ''가 유효하지 않습니다. 'Uncategorized'로 설정
경고: 라이브러리 WiFiProv에서 카테고리 ''가 유효하지 않습니다. 'Uncategorized'로 설정
Archiving built core (caching) in: /tmp/arduino_cache_547584/core/core_esp32_esp32_esp32_JTAGAdapter_default,PSRAM_disabled,PartitionScheme_default,CPUFreq_240,FlashMode_dio,FlashFreq_80,FlashSize_4M,UploadSpeed_921600,LoopCore_1,EventsCore_1,DebugLevel_none,EraseFlash_none,ZigbeeMode_default_302ebf432393f02a3a54f86a94370d90.a
>: -c: 줄 1: `''을(를) 찾는 도중 예상치 못한 파일의 끝
>: -c: 줄 2: 문법 오류: 예기치 않은 파일의 끝
exit status 2
보드 ESP32 Dev Module 컴파일 에러.

 

그래서 혹시 몰라 3.2.1를 받아서 하니 잘된다. 이게 머야 -_-

 

귀찮아서 빌드 테스트를 위해

예제 > ESP32 > ChipID 해서 빌드하니 잘된다.

 

어디서 주워듣기로는 DIO로 하라는데 QIO던 DIO던 잘되니 상관없나..

 

부팅시에 부트로더 메시지에서 mode DIO로 나오니.. DIO 로 해야할 느낌?

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:1
load:0x3fff0030,len:4888
load:0x40078000,len:16456
load:0x40080400,len:4
load:0x40080404,len:3476
entry 0x400805b4

 

실행되고 시리얼 모니터로 보는데, 부트로더 에러나서 같은거 계속 출력하는 줄.. -_-

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

esp32 와 ili9341 direction  (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 구차니
embeded/esp322026. 1. 21. 14:13

LCD는 ILI9341 인듯하다. 케이스에는 7789 라더니 개뻥이었나.

 

Demo_LVGL(idf-4.3) 라고 되어있어서 idf-4.3을 다운로드 받아 설치하고 환경 변수 잡아주고

mkdir -p ~/esp
cd ~/esp
git clone -b v4.3 --recursive https://github.com/espressif/esp-idf.git

./install.sh

. $HOME/esp/esp-idf/export.sh

[링크 : https://docs.espressif.com/projects/esp-idf/en/v4.3/esp32/get-started/index.html#step-2-get-esp-idf]

[링크 : https://docs.espressif.com/projects/esp-idf/en/stable/esp32/versions.html]

 

빌드해서

$ idf.py build

 

넣어주면

idf.py flash -p /dev/ttyUSB1
/home/minimonk/esp/esp-idf43/tools/check_python_dependencies.py:23: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
/home/minimonk/esp/esp-idf43/tools/idf.py:384: DeprecationWarning: 'MultiCommand' is deprecated and will be removed in Click 9.0. Use 'Group' instead.
  class CLI(click.MultiCommand):
Executing action: flash
Running ninja in directory /home/minimonk/5_35_LVGL_Full_Test-S024/build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cd /home/minimonk/esp/esp-idf43/c...nents/esptool_py/run_serial_tool.cmake
esptool.py esp32 -p /dev/ttyUSB1 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 lvgl-demo.bin
esptool.py v3.1-dev
Serial port /dev/ttyUSB1
Connecting.......
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 5c:01:3b:33:c6:b0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x00074fff...
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 488.3 kbit/s)...
Hash of data verified.
Compressed 25056 bytes to 15381...
Writing at 0x00001000... (100 %)
Wrote 25056 bytes (15381 compressed) at 0x00001000 in 0.7 seconds (effective 272.5 kbit/s)...
Hash of data verified.
Compressed 412096 bytes to 242315...
Writing at 0x00010000... (6 %)
Writing at 0x00019393... (13 %)
Writing at 0x00022bdb... (20 %)
Writing at 0x000285ac... (26 %)
Writing at 0x0002e521... (33 %)
Writing at 0x000341bb... (40 %)
Writing at 0x0003a063... (46 %)
Writing at 0x0004196e... (53 %)
Writing at 0x000471d6... (60 %)
Writing at 0x0004cf75... (66 %)
Writing at 0x00052dee... (73 %)
Writing at 0x00058bce... (80 %)
Writing at 0x00062282... (86 %)
Writing at 0x0006a20c... (93 %)
Writing at 0x0006fb38... (100 %)
Wrote 412096 bytes (242315 compressed) at 0x00010000 in 5.8 seconds (effective 570.3 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done

 

깨져서 나온다.

 

최상위 디렉토리에서 sdkconfig 파일을 열어 몇 개 수정해보면 될 거 같은데


#
# Touchpanel Configuration (XPT2046)
#
CONFIG_LVGL_TOUCH_X_MIN=200
CONFIG_LVGL_TOUCH_Y_MIN=120
CONFIG_LVGL_TOUCH_X_MAX=1900
CONFIG_LVGL_TOUCH_Y_MAX=1900
# CONFIG_LVGL_TOUCH_XY_SWAP is not set
CONFIG_LVGL_TOUCH_INVERT_X=y
CONFIG_LVGL_TOUCH_INVERT_Y=y
# end of Touchpanel Configuration (XPT2046)
# end of LVGL Touch controller

#
# 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 is not set
# CONFIG_LVGL_DISPLAY_ORIENTATION_PORTRAIT_INVERTED is not set
# CONFIG_LVGL_DISPLAY_ORIENTATION_LANDSCAPE is not set
CONFIG_LVGL_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED=y
CONFIG_LVGL_DISPLAY_ORIENTATION=3
#CONFIG_LVGL_DISPLAY_WIDTH=320
CONFIG_LVGL_DISPLAY_WIDTH=240
#CONFIG_LVGL_DISPLAY_HEIGHT=240
CONFIG_LVGL_DISPLAY_HEIGHT=320
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

 

정상인듯 정상이 아닌듯한 너.. -_-

그 와중에 화면 좌우로 바뀌고, 터치도 xy 뒤집히고 난리네 어떻게 잡냐..

+

[링크 : https://github.com/lvgl/lvgl_esp32_drivers/issues/234]

[링크 : https://forum.lvgl.io/t/how-to-run-lvgl-under-micropython-on-the-cheap-yellow-display/19142]

 

최대 프레임이 잡혀있는건진 모르겠지만 33 이상은 안나오고, 클럭 디바이더 2에서 사용하지 않음을 해주어도 변화가 없다.

# CONFIG_LVGL_TFT_USE_CUSTOM_SPI_CLK_DIVIDER is not set
CONFIG_LVGL_TFT_CUSTOM_SPI_CLK_DIVIDER=2

 

일단 조금 복잡하면 25 프레임, 심플하면 33 프레임이 나온다.

 

 

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

esp32 와 ili9341 direction  (0) 2026.01.23
esp32-wroom-32 보드 / arduino 개발툴  (0) 2026.01.23
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 구차니
embeded/risc-v2026. 1. 19. 09:32

한국인이 작성한 risc v hdl

rv32i 를 xilinx  기반으로 구현한 듯.

[링크 : https://github.com/RISC-KC/basic_rv32s]

[링크 : https://news.hada.io/topic?id=25632]

'embeded > risc-v' 카테고리의 다른 글

risc-v sbc  (0) 2025.07.08
risc-v sv39  (0) 2023.11.18
milk-v duo(risc-v)  (0) 2023.11.18
부품 도착! + 주문 취소!  (0) 2023.11.02
오늘의 지름  (0) 2023.11.01
Posted by 구차니
embeded/esp322026. 1. 17. 18:54

회사가 망했나 안보이네?

whois 조회해보니 2024년 11우러 이후로는 업데이트 된적이 없다는데

2027년까진 구매되어있다는데 서버는 터진듯.

%kwhois    Domain Name: JCZN1688.COM
   Registry Domain ID: 2661762794_DOMAIN_COM-VRSN
   Registrar WHOIS Server: grs-whois.hichina.com
   Registrar URL: http://wanwang.aliyun.com
   Updated Date: 2024-11-15T01:42:33Z
   Creation Date: 2021-12-15T06:22:58Z
   Registry Expiry Date: 2027-12-15T06:22:58Z
   Registrar: Alibaba Cloud Computing Ltd. d/b/a HiChina (http://www.net.cn)
   Registrar IANA ID: 1599
   Registrar Abuse Contact Email: DomainAbuse@service.aliyun.com
   Registrar Abuse Contact Phone: +86.95187
   Domain Status: ok https://icann.org/epp#ok
   Name Server: DNS19.HICHINA.COM
   Name Server: DNS20.HICHINA.COM
   DNSSEC: unsigned
   URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2026-01-17T09:30:40Z <<<

[링크 : http://www.jczn1688.com/zlxz]

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

 

jczn 멀 어떻게 줄인거냐 -ㅁ-?!?!

 

확장 io와 온도/습도 센서용 인터페이스라..

[링크 : https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/blob/main/OriginalDocumentation/2-Specification/ESP32-2432S028%20Specifications-EN.pdf]

 

usb-c 가 하나만 있는 녀석으로 v2인가? 내꺼랑은 다르네 ㅠㅠ

[링크 : https://ko.aliexpress.com/item/1005005138982767.html?gatewayAdapt=bra2kor]

 

위의 링크는 깨진것 같아서 다시 상위부터 접속해보니 먼가 나오긴 한다.

2.8과 3.2를 받아봤는데 아무튼 내꺼랑은 다른 모델인듯..

LCD가 달라져서 바이너리 그대로 쓸수도 없을 것 같은데..

[링크 : http://pan.jczn1688.com/1/ESP32%20module]

 

2.8인치 에서 받아서 보는 중

microSD는 TF라고 해서 IO5 / IO18 / IO19 / IO23 으로 연결되고 esp-wroom-32 에서는 VSPI 로 연결된다.

LED-RGB는 단순(?) gpio로 on/off 하는 스타일

DAC는 io26 핀이고  dac2로 표시되어있는 부분

 

그 와중에 flash 라고 U4가 있는데 내꺼에는 부품이 없다. NC 처리된 모델인듯.

없으면 확인할게 하나 줄었으니 머 다행인가? ㅋㅋ

[링크 : https://github.com/witnessmenow/ESP32-Cheap-Yellow-Display/issues/261]

 

lcm이 TFT 인데 io2 / io12~1015 / io21 을 이용하여 연결되고

io2는 그냥 gpio 같고

io12~io15는 HSPI 포트로 연결된다. 이름부터 웬지 빨라보이네

 

 

원하는건 못 찾았는데

HSPI(spi2) VSPI (spi3)는  아무튼 빠르니까 이름이 좀더 붙은건가? qspi 같은 건 아닌거 같은데..

[링크 : https://documentation.espressif.com/esp32_technical_reference_manual_en.pdf#iomuxgpio]

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

esp32-wroom-32 보드 / arduino 개발툴  (0) 2026.01.23
esp32-2432S028 데모 빌드  (0) 2026.01.21
esp32-2432S028 보드 st7789 spi lcd driver?  (0) 2026.01.16
esp32 와 spi lcd 성능 비..교?  (0) 2026.01.12
esp32 c6 zigbee thread matter  (0) 2026.01.10
Posted by 구차니
embeded/esp322026. 1. 16. 23:21

액정은 뜯을수가 없어서 포기하고, 뒷면 전체를 보면

평범한(?) esp32-wroom-32 , 터치ic, sd 카드, rgb led, usb 시리얼 칩 그리고 ldo가 보인다.

 

esp32-wroom-32

xpt2046 터치 ic

rgb led

 

스피커 단자도 있는데 esp32의 dac 기능이 있었나?

AMS1117 LDO 2개

LTK8002D 오디오 앰프. 읭?

 

2채널 DAC가 있다고 하니 그걸 사용하면 될 것 같긴한데 일단 스피커와 앰프는 1채널만 해둔 듯?

[링크 : https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/dac.html]

[링크 : https://blog.naver.com/mapes_khkim/222284886951]

 

CH430C usb to serial

 

윈도우에서 보니 드라이버가 없는지 안 잡혀서

 

sparkfun에서 받아서 설치하니 잡힌다.

micro USB 나 USB-C 양쪽모두 시리얼 포트가 연결되어 있다.

[링크 : https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all#windows-710]

 

시리얼 포트를 115200bps로 연결하고 reset을 눌러보니 친숙한(?)

esp32 부트로더가 보이는 듯.

 

같이 준 케이스에 먼가 써있어서 구글 렌즈의 힘을 빌어보니

터치기능이 있는 7789라.. st7789 LCD 드라이버를 쓴걸려나?

 

 

맞다면.. 실험적으로는 65fps까지 나온다는 건데 오호.. 1.5만원에 사온거 치고는 좋은 액정이군(!)

ESP32 LCDs performance report
1. ST7796 4-wire SPI   16fps
2. ST7796 8-bit   34fps
3. ILI9488 4-wire SPI  11fps
4. ILI9488 8-bit  34fps
5. ST7789 4-wire SPI  65fps
6. ST7789 8-bit  5xfps(weird)
7. ILI9341 4-wire SPI  65fps
8. GC9A01  8xfps
9. ST7789 240x240  8xfps

[링크 : https://www.facebook.com/groups/797613180807626/posts/1048617505707191/]

 

내껀 v3 인 듯? (usb-c랑 micro usb가 있음)

ESP32-2432S028R は 3つのバージョンがあります。(R=XPT2046 抵抗膜タッチセンス)
  1. ESP32-2432S028R v1 (ILI9341 SPI):初期。U4 ICの設計ミス。
  2. ESP32-2432S028R v2 (ILI9341 SPI):U4 IC Remove。External Pin Assign change.
  3. ESP32-2432S028R v3 (ST7789 SPI, MODE 3):A type with two USB ports.:YD2USB

[링크 : https://macsbug.wordpress.com/2022/08/17/esp32-2432s028/]

 

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

 

+

2026.01.19

헤더 바꾸고 나서 한번 해봐야 할 듯.

User_Setup.h

#define ILI9341_2_DRIVER     // Alternative ILI9341 driver, see https://github.com/Bodmer/TFT_eSPI/issues/1172
//#define ST7789_DRIVER      // Full configuration option, define additional parameters below for this display

[링크 : lvgl-gemini/arduino_lib/TFT_eSPI/User_Setup.h at main · MYusufY/lvgl-gemini · GitHub ]

[링크 : https://github.com/MYusufY/lvgl-gemini/tree/main]

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

esp32-2432S028 데모 빌드  (0) 2026.01.21
esp32-2432S028 데이터 시트  (0) 2026.01.17
esp32 와 spi lcd 성능 비..교?  (0) 2026.01.12
esp32 c6 zigbee thread matter  (0) 2026.01.10
esp32 benchmark  (0) 2025.11.18
Posted by 구차니
embeded/esp322026. 1. 12. 16:44

문득 남에건 빠른데 내껀 왜 느리지 싶어서 찾아보는 중

내가 가진건 st7735 칩셋이고 얘가 좀 많이 느린듯

[링크 : https://minimonk.tistory.com/524246]

 

라즈베리 파이용으로 구했던건 dtb 상으로 ili9486 같다. (3.5inch rpi lcd (a) v3)

돌이켜 보면 mame 하기 버거울 정도로 느렸던것 같은데. 아무튼 16MHz 였군

waveshare35a: waveshare35a@0{
                                compatible = "ilitek,ili9486";
                                reg = <0>;
                                pinctrl-names = "default"; 
                                pinctrl-0 = <&waveshare35a_pins>;
                                spi-max-frequency = <16000000>;
                                rotate = <90>;
                                bgr;
                                fps = <30>;
                                buswidth = <8>;
                                regwidth = <16>;

[링크 : https://minimonk.tistory.com/5694]

 

그래서 나중에 구매한 3.5inch rpi lcd (c) 고속 lcd 인데 칩셋 이름이 없다.

Supports 125MHz high-speed SPI signal transmission

 

dtb 받아서 확인해보니 클럭이 어마어하게 올랐다. 어우 115Mhz 라니 기존대비 7배 올랐네

$ dtc -I dtb -O dts waveshare35c.dtbo 
<stdout>: Warning (unit_address_vs_reg): /fragment@0/__overlay__/spidev@0: node has a unit name, but no reg or ranges property
<stdout>: Warning (unit_address_vs_reg): /fragment@0/__overlay__/spidev@1: node has a unit name, but no reg or ranges property
<stdout>: Warning (gpios_property): /fragment@2/__overlay__/tft35a@0:reset-gpios: Could not get phandle node for (cell 0)
<stdout>: Warning (gpios_property): /fragment@2/__overlay__/tft35a@0:dc-gpios: Could not get phandle node for (cell 0)
<stdout>: Warning (gpios_property): /fragment@2/__overlay__/tft35a-ts@1:pendown-gpio: Could not get phandle node for (cell 0)
<stdout>: Warning (gpios_property): /__fixups__:gpio: property size (218) is invalid, expected multiple of 4
<stdout>: Warning (interrupts_property): /fragment@2/__overlay__/tft35a-ts@1:interrupt-parent: Bad phandle
/dts-v1/;

/ {
compatible = "brcm,bcm2835\0brcm,bcm2708\0brcm,bcm2709";

fragment@0 {
target = <0xdeadbeef>;

__overlay__ {
status = "okay";

spidev@0 {
status = "disabled";
};

spidev@1 {
status = "disabled";
};
};
};

fragment@1 {
target = <0xdeadbeef>;

__overlay__ {

tft35a_pins {
brcm,pins = <0x11 0x19 0x18>;
brcm,function = <0x00 0x00 0x00>;
linux,phandle = <0x01>;
phandle = <0x01>;
};
};
};

fragment@2 {
target = <0xdeadbeef>;

__overlay__ {
#address-cells = <0x01>;
#size-cells = <0x00>;

tft35a@0 {
compatible = "ilitek,ili9486";
reg = <0x00>;
pinctrl-names = "default";
pinctrl-0 = <0x01>;
spi-max-frequency = <0x6dac2c0>;
txbuflen = <0x8000>;
rotate = <0x5a>;
bgr = <0x00>;
fps = <0x1e>;
buswidth = <0x08>;
regwidth = <0x10>;
reset-gpios = <0xdeadbeef 0x19 0x01>;
dc-gpios = <0xdeadbeef 0x18 0x00>;
debug = <0x00>;
init = <0x10000f1 0x36 0x04 0x00 0x3c 0x0f 0x8f 0x10000f2 0x18 0xa3 0x12 0x02 0xb2 0x12 0xff 0x10 0x00 0x10000f8 0x21 0x04 0x10000f9 0x00 0x08 0x1000036 0x08 0x10000b4 0x00 0x10000c1 0x41 0x10000c5 0x00 0x91 0x80 0x00 0x10000e0 0x0f 0x1f 0x1c 0x0c 0x0f 0x08 0x48 0x98 0x37 0x0a 0x13 0x04 0x11 0x0d 0x00 0x10000e1 0x0f 0x32 0x2e 0x0b 0x0d 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00 0x100003a 0x55 0x1000011 0x1000036 0x28 0x20000ff 0x1000029>;
linux,phandle = <0x02>;
phandle = <0x02>;
};

tft35a-ts@1 {
compatible = "ti,ads7846";
reg = <0x01>;
spi-max-frequency = <0x1e8480>;
interrupts = <0x11 0x02>;
interrupt-parent = <0xdeadbeef>;
pendown-gpio = <0xdeadbeef 0x11 0x01>;
ti,x-plate-ohms = [00 3c];
ti,pressure-max = [00 ff];
linux,phandle = <0x03>;
phandle = <0x03>;
};
};
};

__overrides__ {
speed = <0x02 0x7370692d 0x6d61782d 0x66726571 0x75656e63 0x793a3000>;
txbuflen = [00 00 00 02 74 78 62 75 66 6c 65 6e 3a 30 00];
rotate = [00 00 00 02 72 6f 74 61 74 65 3a 30 00];
fps = [00 00 00 02 66 70 73 3a 30 00];
bgr = [00 00 00 02 62 67 72 3a 30 00];
debug = <0x02 0x64656275 0x673a3000>;
swapxy = <0x03 0x74692c73 0x7761702d 0x78793f00>;
};

__symbols__ {
tft35a_pins = "/fragment@1/__overlay__/tft35a_pins";
tft35a = "/fragment@2/__overlay__/tft35a@0";
tft35a_ts = "/fragment@2/__overlay__/tft35a-ts@1";
};

__fixups__ {
spi0 = "/fragment@0:target:0\0/fragment@2:target:0";
gpio = "/fragment@1:target:0\0/fragment@2/__overlay__/tft35a@0:reset-gpios:0\0/fragment@2/__overlay__/tft35a@0:dc-gpios:0\0/fragment@2/__overlay__/tft35a-ts@1:interrupt-parent:0\0/fragment@2/__overlay__/tft35a-ts@1:pendown-gpio:0";
};

__local_fixups__ {
fixup = "/fragment@2/__overlay__/tft35a@0:pinctrl-0:0\0/__overrides__:speed:0\0/__overrides__:txbuflen:0\0/__overrides__:rotate:0\0/__overrides__:fps:0\0/__overrides__:bgr:0\0/__overrides__:debug:0\0/__overrides__:swapxy:0";
};
};

[링크 : https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(C)?srsltid=AfmBOoqSBx9MWwgfxNGqcf86r2X4O_xpUVpX6gSELU31q2-5_RCjE0z1

[링크 : https://minimonk.tistory.com/9776]

 

예전에 2.4만원 넘어서 안샀던 것들이 ili9341 계열인데, 아래 보면 65fps까지 되는 쩌는 애들이네

[링크 : https://minimonk.tistory.com/12398]

 

아무튼 저런 애들을 써야 성능이 잘 나온다~ 라는거군

ESP32 LCDs performance report
1. ST7796 4-wire SPI   16fps
2. ST7796 8-bit   34fps
3. ILI9488 4-wire SPI  11fps
4. ILI9488 8-bit  34fps
5. ST7789 4-wire SPI  65fps
6. ST7789 8-bit  5xfps(weird)
7. ILI9341 4-wire SPI  65fps
8. GC9A01  8xfps
9. ST7789 240x240  8xfps

[링크 : https://www.facebook.com/groups/797613180807626/posts/1048617505707191/]

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

esp32-2432S028 데이터 시트  (0) 2026.01.17
esp32-2432S028 보드 st7789 spi lcd driver?  (0) 2026.01.16
esp32 c6 zigbee thread matter  (0) 2026.01.10
esp32 benchmark  (0) 2025.11.18
esp32 계열 정리  (0) 2025.07.08
Posted by 구차니