Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 29,405
» Latest member: Hoodsong
» Forum threads: 16,173
» Forum posts: 116,789

Full Statistics

Latest Threads
Need new eMMC
Forum: General Discussion on Pinebook Pro
Last Post: KC9UDX
8 hours ago
» Replies: 1
» Views: 34
A host named regret
Forum: General Discussion on PinePhone
Last Post: 1111
Today, 09:48 AM
» Replies: 7
» Views: 1,445
U.FL plug on the Wifi/BT ...
Forum: RockPro64 Hardware and Accessories
Last Post: clairelafitte21
Today, 06:27 AM
» Replies: 9
» Views: 15,872
Pinephone pro ee bricked?
Forum: General Discussion of PinePhone Pro
Last Post: Dendrocalamus64
Today, 12:06 AM
» Replies: 3
» Views: 71
PinePhone Pro EU no warra...
Forum: General Discussion on PinePhone
Last Post: P. Siera
Yesterday, 12:08 AM
» Replies: 0
» Views: 53
pinetab2 danctnix broken ...
Forum: PineTab Software
Last Post: acruhl
07-20-2025, 05:33 PM
» Replies: 4
» Views: 131
irradium (based on crux l...
Forum: Linux on Rock64
Last Post: mara
07-20-2025, 01:00 PM
» Replies: 9
» Views: 3,049
irradium (based on crux l...
Forum: Linux on RockPro64
Last Post: mara
07-20-2025, 05:13 AM
» Replies: 8
» Views: 4,027
is there any settings men...
Forum: Pinecil Software
Last Post: ejames82
07-19-2025, 08:45 AM
» Replies: 0
» Views: 38
Zig booting up on PinePho...
Forum: General
Last Post: WhiteHexagon
07-19-2025, 03:11 AM
» Replies: 0
» Views: 72

 
  ST7789V LCD problem (RAMWR does not work for me)
Posted by: breeze - 04-04-2022, 09:03 AM - Forum: General Discussion on PineTime - Replies (1)

I am trying some baremetal project.



And stuck with two problems:

1st RAMWR does not work for me in code below. ST7789V accepts the data, but ignores it: display stays black. I can't find why.

2nd might come from first problem. I use STLink V2 and flash like:



1st window:

openocd.exe -s ..\scripts\ -f interface\stlink.cfg -f target\nrf52.cfg -c "bindto 0.0.0.0"

2nd window:

arm-none-eabi-gdb --batch -ex="target extended-remote 127.0.0.1:3333" -ex "monitor program c:/pine/mbr.bin 0x00000000" -ex "monitor reset"

arm-none-eabi-gdb -ex="target extended-remote 127.0.0.1:3333"

and in gdb I need to issue "r" command to have any effect.

I.E. reboot after flash does not happen by itself, also after program exec instead of reboot I have HardFault.



Display is not dead: latest infinitime works for me on that device.



Any hints?

Code:
                .syntax     unified
                .cpu        cortex-m4
                .arch       armv7e-m
                .thumb
                .section    .text,"ax"
                .balign     4

                .equ        GPIO_BASE,                      0x50000000
                .equ        GPIO_OUT,                       0x504
                .equ        GPIO_OUTSET,                    0x508
                .equ        GPIO_OUTCLR,                    0x50C
                .equ        GPIO_IN,                        0x510
                .equ        GPIO_DIR,                       0x514
                .equ        GPIO_DIRSET,                    0x518
                .equ        GPIO_DIRCLR,                    0x51C

                .equ        FLASH_SELECT,                   5

                .equ        LCD_SCK,                        2
                .equ        LCD_MOSI,                       3
                .equ        LCD_MISO,                       4
                .equ        LCD_SELECT,                     25
                .equ        LCD_COMMAND,                    18
                .equ        LCD_RESET,                      26
                .equ        LCD_BACKLIGHT_LOW,              14
                .equ        LCD_BACKLIGHT_MID,              22
                .equ        LCD_BACKLIGHT_HIGH,             23
                .equ        LCD_OUTPUTS_CONTROL_MASK,       (1<<LCD_SCK) | (1<<LCD_MOSI) | (1<<LCD_SELECT) | (1<<LCD_COMMAND) | (1<<LCD_RESET)
                .equ        LCD_OUTPUTS_BACKLIGHT_MASK,     (1<<LCD_BACKLIGHT_LOW) | (1<<LCD_BACKLIGHT_MID) | (1<<LCD_BACKLIGHT_HIGH)

                .equ        LCD_SPI_BASE,                   0x40003000
                .equ        LCD_SPI_ENABLE,                 0x500
                .equ        LCD_SPI_PSELSCK,                0x508
                .equ        LCD_SPI_PSELMOSI,               0x50C
                .equ        LCD_SPI_PSELMISO,               0x510
                .equ        LCD_SPI_RXD,                    0x518
                .equ        LCD_SPI_TXD,                    0x51C
                .equ        LCD_SPI_FREQUENCY,              0x524
                .equ        LCD_SPI_CONFIG,                 0x554
                .equ        LCD_SPI_EVENTS_READY,           0x108
               
                .equ        LCD_WIDTH,                      8
                .equ        LCD_HEIGHT,                     8
                .equ        LCD_FULL_BYTES_SIZE,            (LCD_WIDTH*LCD_HEIGHT)
               
                .equ        CMD_SWRESET,                    0x01
                .equ        CMD_SLPOUT,                     0x11
                .equ        CMD_COLMOD,                     0x3A
                .equ        CMD_NORON,                      0x13 // Normal Display Mode On
                .equ        CMD_INVOFF,                     0x20 // Display Inversion Off
                .equ        CMD_INVON,                      0x21 // Display Inversion On
                .equ        CMD_DISPOFF,                    0x28 // Display Off
                .equ        CMD_DISPON,                     0x29 // Display On
                .equ        CMD_CASET,                      0x2A // Column Address Set
                .equ        CMD_RASET,                      0x2B // Row Address Set
                .equ        CMD_RAMWR,                      0x2C // Memory Write
                .equ        CMD_RAMRD,                      0x2E // Memory Read
                .equ        CMD_MADCTL,                     0x36 // Memory Data Access Control
                .equ        CMD_VSCSAD,                     0x37 // Vertical Scroll Start Address of RAM
                .equ        CMD_RAMCTRL,                    0xB0 // RAM Control
                .equ        CMD_PORCTRL,                    0xB2 // Porch Setting
                .equ        CMD_CMD2EN,                     0xDF // Command 2 Enable

                .equ        PUSH_BUTTON_IN,                 13
                .equ        PUSH_BUTTON_OUT,                15

                .equ        GPIO_OUTPUTS_MASK,              FLASH_SELECT | LCD_OUTPUTS_CONTROL_MASK | LCD_OUTPUTS_BACKLIGHT_MASK
                .equ        GPIO_INPUTS_MASK,               (1<<LCD_MISO)

                .macro      Sleep Reg, Tacts
                MOV         \Reg, \Tacts
loop\@:
                SUBS        \Reg, 1
                BNE         loop\@
                .endm

__Vectors:
                .org        0
                .word       __initial_sp                    // Top of Stack
                .word       Reset_Handler                   // Reset Handler
                .word       NMI_Handler                     // NMI Handler
                .word       HardFault_Handler               // Hard Fault Handler
                .word       MemManage_Handler               // MPU Fault Handler
                .word       BusFault_Handler                // Bus Fault Handler
                .word       UsageFault_Handler              // Usage Fault Handler
                .word       0                               // 7  Reserved
                .word       0                               // 8  Reserved
                .word       0                               // 9  Reserved
                .word       0                               // 10 Reserved
                .word       SVCall_Handler                  // Supervisor Call Handler
                .word       DebugMonitor_Handler            // Debug Monitor Handler
                .word       0                               // 13 Reserved
                .word       PendSV_Handler                  // Deferred Supervisor Call Handler
                .word       SysTick_Handler                 // System Timer Handler
                .word       CLOCK_POWER_BPROT_Handler       // 00 Clock control / Power control / Block Protect
                .word       RADIO_Handler                   // 01 2.4 GHz radio
                .word       UARTE0_Handler                  // 02 Universal Asynchronous Receiver/Transmitter with EasyDMA
                .word       SPIM0_SPIS0_TWIM0_TWIS0_Handler // 03 SPI master 0 / SPI slave 0 / Two-wire interface master 0 / Two-wire interface slave 0
                .word       SPIM1_SPIS1_TWIM1_TWIS1_Handler // 04 SPI master 1 / SPI slave 1 / Two-wire interface master 1 / Two-wire interface slave 1
                .word       NFCT_Handler                    // 05 Near Field Communication Tag
                .word       GPIOTE_Handler                  // 06 GPIO Tasks and Events
                .word       SAADC_Handler                   // 07 Analog to digital converter
                .word       TIMER0_Handler                  // 08 Timer 0
                .word       TIMER1_Handler                  // 09 Timer 1
                .word       TIMER2_Handler                  // 0A Timer 2
                .word       RTC0_Handler                    // 0B Real-time counter 0
                .word       TEMP_Handler                    // 0C Temperature sensor
                .word       RNG_Handler                     // 0D Random number generator
                .word       ECB_AES_Handler                 // 0E Electronic Code Book (ECB) mode block encryption
                .word       CCM_AAR_Handler                 // 0F AES CCM Mode Encryption / Acelerated Address Resolver
                .word       WDT_Handler                     // 10 Watchdog timer
                .word       RTC1_Handler                    // 11 Real-time counter 1
                .word       QDEC_Handler                    // 12 Quadrature decoder
                .word       LPCOMP_Handler                  // 13 Low power comparator
                .word       COMP_Handler                    // 14 General purpose comparator
                .word       EGU0_SWI0_Handler               // 15 Event Generator Unit 0 / Software interrupt 0
                .word       EGU1_SWI1_Handler               // 16 Event Generator Unit 1 / Software interrupt 1
                .word       EGU2_SWI2_Handler               // 17 Event Generator Unit 2 / Software interrupt 2
                .word       EGU3_SWI3_Handler               // 18 Event Generator Unit 3 / Software interrupt 3
                .word       EGU4_SWI4_Handler               // 19 Event Generator Unit 4 / Software interrupt 4
                .word       EGU5_SWI5_Handler               // 1A Event Generator Unit 5 / Software interrupt 5
                .word       TIMER3_Handler                  // 1B Timer 3
                .word       TIMER4_Handler                  // 1C Timer 4
                .word       PWM0_Handler                    // 1D Pulse Width Modulation Unit 0
                .word       PDM_Handler                     // 1E Pulse Density Modulation (Digital Microphone Interface)
                .word       NVMC_Handler                    // 1F Non-Volatile Memory Controller
                .word       PPI_Handler                     // 20 Programmable Peripheral Interconnect
                .word       MWU_Handler                     // 21 Memory Watch Unit
                .word       PWM1_Handler                    // 22 Pulse Width Modulation Unit 1
                .word       PWM2_Handler                    // 23 Pulse Width Modulation Unit 2
                .word       SPIS2_Handler                   // 24 SPI slave 2
                .word       SPIM2_Handler                   // 25 SPI master 2
                .word       RTC2_Handler                    // 26 Real-time counter 2
                .word       I2S_Handler                     // 27 Inter-IC Sound Interface
                .word       FPU_Handler                     // 28 FPU interrupt
                .word       ISR_29_Handler                  // 29 ISR_Handler
                .word       ISR_2A_Handler                  // 2A ISR_Handler
                .word       ISR_2B_Handler                  // 2B ISR_Handler
                .word       ISR_2C_Handler                  // 2C ISR_Handler
                .word       ISR_2D_Handler                  // 2D ISR_Handler
                .word       ISR_2E_Handler                  // 2E ISR_Handler
                .word       ISR_2F_Handler                  // 2F ISR_Handler

NMI_Handler:                                                // NMI Handler
                B           Reset
HardFault_Handler:                                          // Hard Fault Handler
                B           Reset
MemManage_Handler:                                          // MPU Fault Handler
                B           Reset
BusFault_Handler:                                           // Bus Fault Handler
                B           Reset
UsageFault_Handler:                                         // Usage Fault Handler
                B           Reset
SVCall_Handler:                                             // Supervisor call Handler
                B           Reset
DebugMonitor_Handler:                                       // Debug Monitor Handler
                B           Reset
PendSV_Handler:                                             // Deferred Supervisor Call Handler
                B           Reset
SysTick_Handler:                                            // System Timer Handler
                B           Reset
CLOCK_POWER_BPROT_Handler:                                  // 00 Clock control / Power control / Block Protect
                B           Reset
RADIO_Handler:                                              // 01 2.4 GHz radio
                B           Reset
UARTE0_Handler:                                             // 02 Universal Asynchronous Receiver/Transmitter with EasyDMA
                B           Reset
SPIM0_SPIS0_TWIM0_TWIS0_Handler:                            // 03 SPI master 0 / SPI slave 0 / Two-wire interface master 0 / Two-wire interface slave 0
                B           .
SPIM1_SPIS1_TWIM1_TWIS1_Handler:                            // 04 SPI master 1 / SPI slave 1 / Two-wire interface master 1 / Two-wire interface slave 1
                B           .
NFCT_Handler:                                               // 05 Near Field Communication Tag
                B           .
GPIOTE_Handler:                                             // 06 GPIO Tasks and Events
                B           .
SAADC_Handler:                                              // 07 Analog to digital converter
                B           .
TIMER0_Handler:                                             // 08 Timer 0
                B           .
TIMER1_Handler:                                             // 09 Timer 1
                B           .
TIMER2_Handler:                                             // 0A Timer 2
                B           .
RTC0_Handler:                                               // 0B Real-time counter 0
                B           .
TEMP_Handler:                                               // 0C Temperature sensor
                B           .
RNG_Handler:                                                // 0D Random number generator
                B           .
ECB_AES_Handler:                                            // 0E Electronic Code Book (ECB) mode block encryption
                B           .
CCM_AAR_Handler:                                            // 0F AES CCM Mode Encryption / Acelerated Address Resolver
                B           .
WDT_Handler:                                                // 10 Watchdog timer
                B           .
RTC1_Handler:                                               // 11 Real-time counter 1
                B           .
QDEC_Handler:                                               // 12 Quadrature decoder
                B           .
LPCOMP_Handler:                                             // 13 Low power comparator
                B           .
COMP_Handler:                                               // 14 General purpose comparator
                B           .
EGU0_SWI0_Handler:                                          // 15 Event Generator Unit 0 / Software interrupt 0
                B           .
EGU1_SWI1_Handler:                                          // 16 Event Generator Unit 1 / Software interrupt 1
                B           .
EGU2_SWI2_Handler:                                          // 17 Event Generator Unit 2 / Software interrupt 2
                B           .
EGU3_SWI3_Handler:                                          // 18 Event Generator Unit 3 / Software interrupt 3
                B           .
EGU4_SWI4_Handler:                                          // 19 Event Generator Unit 4 / Software interrupt 4
                B           .
EGU5_SWI5_Handler:                                          // 1A Event Generator Unit 5 / Software interrupt 5
                B           .
TIMER3_Handler:                                             // 1B Timer 3
                B           .
TIMER4_Handler:                                             // 1C Timer 4
                B           .
PWM0_Handler:                                               // 1D Pulse Width Modulation Unit 0
                B           .
PDM_Handler:                                                // 1E Pulse Density Modulation (Digital Microphone Interface)
                B           .
NVMC_Handler:                                               // 1F Non-Volatile Memory Controller
                B           .
PPI_Handler:                                                // 20 Programmable Peripheral Interconnect
                B           .
MWU_Handler:                                                // 21 Memory Watch Unit
                B           .
PWM1_Handler:                                               // 22 Pulse Width Modulation Unit 1
                B           .
PWM2_Handler:                                               // 23 Pulse Width Modulation Unit 2
                B           .
SPIS2_Handler:                                              // 24 SPI slave 2
                B           .
SPIM2_Handler:                                              // 25 SPI master 2
                B           .
RTC2_Handler:                                               // 26 Real-time counter 2
                B           .
I2S_Handler:                                                // 27 Inter-IC Sound Interface
                B           .
FPU_Handler:                                                // 28 FPU interrupt
                B           .
ISR_29_Handler:                                             // 29 ISR Handler
                B           .
ISR_2A_Handler:                                             // 2A ISR Handler
                B           .
ISR_2B_Handler:                                             // 2B ISR Handler
                B           .
ISR_2C_Handler:                                             // 2C ISR Handler
                B           .
ISR_2D_Handler:                                             // 2D ISR Handler
                B           .
ISR_2E_Handler:                                             // 2E ISR Handler
                B           .
ISR_2F_Handler:                                             // 2F ISR Handler
                B           .

Reset_Handler:
lcd_init:
                MOV         R7, GPIO_BASE
                LDR         R6, =LCD_SPI_BASE
               
                LDR         R0, =GPIO_OUTPUTS_MASK
                STR         R0, [R7, GPIO_DIRSET]

                LDR         R0, =GPIO_INPUTS_MASK
                STR         R0, [R7, GPIO_DIRCLR]

                MOV         R0, (1<<FLASH_SELECT)           // Deactivate FlashMemory
                STR         R0, [R7, GPIO_OUTSET]

                MOV         R0, (1<<LCD_SELECT)             // Activate Display
                STR         R0, [R7, GPIO_OUTCLR]

                MOV         R0, (1<<LCD_COMMAND)
                STR         R0, [R7, GPIO_OUTSET]

                MOV         R0, (1<<LCD_RESET)
                STR         R0, [R7, GPIO_OUTSET]
               
                LDR         R0, =LCD_OUTPUTS_BACKLIGHT_MASK
                STR         R0, [R7, GPIO_OUTSET]

                MOV         R0, (1<<LCD_BACKLIGHT_HIGH)
                STR         R0, [R7, GPIO_OUTCLR]

                MOV         R0, 0
                STR         R0, [R6, LCD_SPI_ENABLE]
               
                MOV         R0, 0
                STR         R0, [R6, LCD_SPI_EVENTS_READY]
               
                MOV         R0, LCD_SCK
                STR         R0, [R6, LCD_SPI_PSELSCK]
               
                MOV         R0, LCD_MOSI
                STR         R0, [R6, LCD_SPI_PSELMOSI]

                MOV         R0, LCD_MISO
                STR         R0, [R6, LCD_SPI_PSELMISO]

                MOV         R0, 0x80000000                  // 8Mbps
                STR         R0, [R6, LCD_SPI_FREQUENCY]

                MOV         R0, (1<<2) | (1<<1)         // CPOL=ActiveLow | CPHA=Trailing | ORDER=MsbFirst
                STR         R0, [R6, LCD_SPI_CONFIG]

                //MOV           R0, 1
                //STR           R0, [R6, LCD_SPI_ENABLE]

                MOV         R0, (1<<LCD_RESET)
                STR         R0, [R7, GPIO_OUTCLR]
                Sleep       R1, 0x1000000
                STR         R0, [R7, GPIO_OUTSET]
                Sleep       R1, 0x1000000

                MOV         R0, CMD_SWRESET
                BL          lcd_transfer_cmd
                Sleep       R0, 0x1000000
               
                MOV         R0, CMD_SLPOUT
                BL          lcd_transfer_cmd
                Sleep       R0, 0x100000
               
                MOV         R0, CMD_VSCSAD
                BL          lcd_transfer_cmd
                MOV         R0, 0x00
                BL          lcd_transfer_data
                BL          lcd_transfer_data
                Sleep       R0, 0x10000
               
//              MOV         R0, CMD_CMD2EN
//              BL          lcd_transfer_cmd
//              MOV         R0, 0x5A
//              BL          lcd_transfer_data
//              MOV         R0, 0x69
//              BL          lcd_transfer_data
//              MOV         R0, 0x02
//              BL          lcd_transfer_data
//              MOV         R0, 0x01
//              BL          lcd_transfer_data
//              Sleep       R0, 0x10000
//
//              MOV         R0, CMD_RAMCTRL
//              BL          lcd_transfer_cmd
//              MOV         R0, 0x00
//              BL          lcd_transfer_data
//              MOV         R0, 0xF0
//              BL          lcd_transfer_data
//              Sleep       R0, 0x10000
//             
//              MOV         R0, CMD_PORCTRL
//              BL          lcd_transfer_cmd
//              MOV         R0, 0x0C
//              BL          lcd_transfer_data
//              BL          lcd_transfer_data
//              MOV         R0, 0x00
//              BL          lcd_transfer_data
//              MOV         R0, 0x33
//              BL          lcd_transfer_data
//              BL          lcd_transfer_data
//              Sleep       R0, 0x10000
//             
//              MOV         R0, CMD_CMD2EN
//              BL          lcd_transfer_cmd
//              MOV         R0, 0x5A
//              BL          lcd_transfer_data
//              MOV         R0, 0x69
//              BL          lcd_transfer_data
//              MOV         R0, 0x02
//              BL          lcd_transfer_data
//              MOV         R0, 0x00
//              BL          lcd_transfer_data
//              Sleep       R0, 0x10000

                MOV         R0, CMD_COLMOD
                BL          lcd_transfer_cmd
                MOV         R0, 0x66                    // 888
                BL          lcd_transfer_data
                Sleep       R0, 0x100
               
                MOV         R0, CMD_MADCTL
                BL          lcd_transfer_cmd
                MOV         R0, 0x00
                BL          lcd_transfer_data
                Sleep       R0, 0x100

fill_display:
                MOV         R0, CMD_CASET
                BL          lcd_transfer_cmd
                MOV         R0, 0
                BL          lcd_transfer_data
                BL          lcd_transfer_data
                BL          lcd_transfer_data
                MOV         R0, LCD_WIDTH
                BL          lcd_transfer_data

                MOV         R0, CMD_RASET
                BL          lcd_transfer_cmd
                MOV         R0, 0
                BL          lcd_transfer_data
                BL          lcd_transfer_data
                BL          lcd_transfer_data
                MOV         R0, LCD_HEIGHT
                BL          lcd_transfer_data

                MOV         R0, CMD_RAMWR
                BL          lcd_transfer_cmd

                MOV         R3, 0xFFFFFFFF
fill_display_data1:
                LDR         R2, =LCD_FULL_BYTES_SIZE
fill_display_data:
                MOV         R0, R3
                BL          lcd_transfer_data
                MOV         R0, 0
                BL          lcd_transfer_data
                BL          lcd_transfer_data
                SUBS        R2, 1
                BNE         fill_display_data
               
                Sleep       R0, 0x100000

                MOV         R0, CMD_DISPOFF
                BL          lcd_transfer_cmd
                Sleep       R0, 0x100000
               
                MOV         R0, CMD_DISPON
                BL          lcd_transfer_cmd
                Sleep       R0, 0x100000

                //MOV         R0, (1<<LCD_SELECT)               // Deactivate Display
                //STR         R0, [R7, GPIO_OUTSET]
               
                LDR         R0, =LCD_OUTPUTS_BACKLIGHT_MASK
                STR         R0, [R7, GPIO_OUTSET]
                Sleep       R0, 0x100000

                MOV         R0, (1<<LCD_BACKLIGHT_HIGH)
                STR         R0, [R7, GPIO_OUTCLR]
                Sleep       R0, 0x100000

                //MOV         R0, (1<<LCD_SELECT)               // Activate Display
                //STR         R0, [R7, GPIO_OUTCLR]

                MOV         R0, CMD_INVON
                BL          lcd_transfer_cmd

                MOV         R0, CMD_NORON
                BL          lcd_transfer_cmd

                LSRS        R3, R3, 1
                BNE         fill_display_data1

                LDR         R0, =LCD_OUTPUTS_BACKLIGHT_MASK
                STR         R0, [R7, GPIO_OUTSET]

                B           Reset

lcd_transfer_cmd:
                MOV         R1, (1<<LCD_SELECT)             // Activate Display
                STR         R1, [R7, GPIO_OUTCLR]
                MOV         R1, (1<<LCD_COMMAND)
                STR         R1, [R7, GPIO_OUTCLR]
                B           lcd_transfer

lcd_transfer_data:
                MOV         R1, (1<<LCD_SELECT)             // Activate Display
                STR         R1, [R7, GPIO_OUTCLR]
                MOV         R1, (1<<LCD_COMMAND)
                STR         R1, [R7, GPIO_OUTSET]
                B           lcd_transfer                    // Hang if removed: display needs time to sense command/data line

lcd_transfer:                                               // R6, R7, R0, R1
                MOV         R1, 1
                STR         R1, [R6, LCD_SPI_ENABLE]
               
                MOV         R1, 0
                STR         R1, [R6, LCD_SPI_EVENTS_READY]
                STR         R0, [R6, LCD_SPI_TXD]

lcd_transfer1:
                LDR         R1, [R6, LCD_SPI_EVENTS_READY]
                ORRS        R1, R1
                BNE         lcd_transfer1

                LDR         R1, [R6, LCD_SPI_RXD]
               
                MOV         R1, 0
                STR         R1, [R6, LCD_SPI_ENABLE]
                MOV         R1, (1<<LCD_SELECT)             // Activate Display
                STR         R1, [R7, GPIO_OUTSET]

                BX          LR

Reset:
                MOV         R0, 0xE000E000                  // #define SCS_BASE            (0xE000E000UL)                            /*!< System Control Space Base Address */
                ADD         R0, 0x0D00                      // #define SCB_BASE            (SCS_BASE +  0x0D00UL)                    /*!< System Control Block Base Address */
                ADD         R0, 0x00C                       // __IOM uint32_t AIRCR;      /*!< Offset: 0x00C (R/W)  Application Interrupt and Reset Control Register */
                LDR         R1, [R0]
                MOV         R2, 0xFFFF
                AND         R1, R2
                MOV         R2, 0x05FA
                LSL         R2, R2, 16
                ORR         R1, R2
                ORR         R1, (1<<2)                      // #define SCB_AIRCR_SYSRESETREQ_Pos 2U /*!< SCB AIRCR: SYSRESETREQ Position */
                STR         R1, [R0]
                B           .

                .equ        nextboot, 0x1000
                .equ        versionsize, 32
                .equ        __initial_sp, 0x20010000        // Top of Stack
                .equ        __initial_sp2_ptr, nextboot       // Top of Stack of next boot loader

                .pool


Compiled and gzipped code from the above:

Code:
H4sICKoGS2ICAG1ici5iaW4AtdHNaxNBGMfxmZiGtURJ1UiQIokWadMiQaXWEOMmrUkQ7cbaivhG
fCtFiiQ9eRFyUkQQevHsn+JBk3MuPXdOhZ5GiTIoNn4nGWvp3Swffvs8z+zsZlcImVyTQgiEEEYE
nu3t+w3Ti7r+YTKGIziG40jgBEZxEkmcwhjOYBxpTOEsMjiHC5jGDLLIIQ8fRcyhhAqu4TrmUcUC
FnEbd3AX9/EQNTzGUyxjBc+xiheoo6xK6qqaU7OqqArKV1dUXl1WObWz9b+OQH8sr8+vV9omMRTo
mGibUTJJeqSot010KOg2k4O6WbP5ptKvukL0p1qIlhEuPRnokE3qA6Sdh8mYnfstM0ZGqBfdbnbe
bMhLvzvuDv3zQPMy9AdDXZczth6hfm94ktigvkj92th7Cv3OCP3WzjKDWZbeS2bL5Cvbd3tMU6+6
axp7+mnqmus/Y68neETtUT8gJ8mqmy8xu4Wbbn6DnCJ9snc+0H4oURK66FbnWZkzMtvt/HvycfoT
e/7JBHVqt864d+umf9/x7uoUq4fZ/SgZMfe8L53T/SvSm9yxwdo4a1M2vX0dL97ja0vJt4ozIb2R
Fl97gzw4+6uzYRKu35837BX1cqA3k+J7tSa+RoVcCX701uR2SPrffi4E26FigfOCDktZ29kSGeEf
8j9HhP9J/AHvBpHwyAMAAA==


  Pinephone keyboard (no, not that one)
Posted by: jhasler - 04-03-2022, 09:22 PM - Forum: General Discussion on PinePhone - No Replies

Needed to do some debugging that would interrupt ssh.  I didn't feature
typing long arcane systemctl commands on the touchscreen so I looked around
for a keyboard. Two full-size keyboards crowds my cluttered desk.  I
remembered a weird little 8"x10" Logitech keyboard I bought at a yard sale
for about $5 so on a lark I dug it out.  It has a microUSB socket but
neither the Pinephone nor the pc see it.  Oh, well.  Before pitching it
back in the junkbox I took a long shot and looked up the part number
(Y-R0023).  Turns out to be a Bluetooth keyboard for an iPad and it pairs
up just fine with the Pinephone!  Not only that, but the Pinephone fits
perfectly in the slot where the iPad would go!  Of course, being from the
Apple world it has no escape key, but that's fixable.  Some of the
special-purpose keys it has instead of function keys even work.


Heart Manjaro with i3 WM?
Posted by: Lubbvard-tentakel - 04-03-2022, 08:33 AM - Forum: PinePhone Software - Replies (1)

I'm getting my first pinephone with the convergence package tomorrow and i wonder if there is any possibilities to use i3 as my window manager on the pinephone? If yes, Is it anyone here that use that as their own setup today or at least have used that?

I'm planning on using it with the pinephone keyboard and not the onscreen-keyboard :O.. I'm using Fedora and also Manjaro with the i3 window manager today already so adapting to the i3 wm on the pinephone wouldn't be that hard i guess..


  USB3.0 Issues at DietPi(Armbian) #22.02.1
Posted by: t4_4t - 04-03-2022, 03:04 AM - Forum: Linux on Rock64 - Replies (3)

Refer spiritofjerry's post : https://forum.pine64.org/showthread.php?tid=6187&page=6
---

Environment actually i tried.
# DietPi
# https://dietpi.com/downloads/images/Diet...ullseye.7z

# uname -a
Linux rock64 5.15.25-rockchip64 #22.02.1 SMP PREEMPT Sun Feb 27 09:05:47 UTC 2022 aarch64 GNU/Linux

reference: kerrnel-set (at least usb3.0 issuses exist)
# https://armbian.site-meganet.com/apt/poo..._arm64.deb
# https://armbian.site-meganet.com/apt/poo..._arm64.deb
# https://armbian.site-meganet.com/apt/poo..._arm64.deb


Problem improvement.

Code:
# gzip -d -k rk3328-rock64.dtb.gz
# mv -v /boot/dtb-5.15.25-rockchip64/rockchip/rk3328-rock64.dtb /boot/dtb-5.15.25-rockchip64/rockchip/rk3328-rock64.dtb_
# cp -v rk3328-rock64.dtb /boot/dtb-5.15.25-rockchip64/rockchip/

# reboot

There are a huge number of usb devices on the market, and there are always compatibility issues,
so I don't think all the issues will be solved.

However, I improved it so that it works properly with my USB device. (USB3.0-HDD etc.)

---

As mentioned above, the process is as simple as replacing a single file.
If you are encountering problems, please give it a try.

# sha1sum: 31ac801a4c0ae5e87745eb638f8c663d02b89dbd    rk3328-rock64.dtb.gz



Attached Files
.gz   rk3328-rock64.dtb.gz (Size: 12.53 KB / Downloads: 378)

  Modem turns off on suspend
Posted by: twzorek95 - 04-02-2022, 08:25 PM - Forum: PinePhone Pro Software - Replies (5)

I recently upgraded to Tow-boot, and installed Arch with kernel 5.17. Suspend works fantastic, however every time the phone suspends the modem turns off. That's great for power saving, but defeats the purpose of having a phone. Is there a way to prevent the modem from turning off on suspend? Running Foss firmware 0.6.1 and I did change the udev rules as specified in the documentation for the firmware on Github. I'm honestly clueless what else I can do.


  Problem with wifi
Posted by: kubussz - 04-02-2022, 12:57 PM - Forum: Mobian on PinePhone - No Replies

I have a problem with wifi. Disconnects after a minute and does not want to search for access points . It happened after some update. Anyone have this problem too?


  Pinephone woon't stay registered
Posted by: jhasler - 04-01-2022, 04:24 PM - Forum: Mobian on PinePhone - Replies (10)

Pinephone beta edition purchased last month.  Installed Mobian and a Tracfone sim.    Activated it successfully.  I can occasionally complete a call but it always gets terminated within a minute or two.  A typical log extract is included below.

Apr 01 17:05:03 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (idle -> registering)
Apr 01 17:05:03 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Apr 01 17:05:03 mobian ModemManager[600]: <info>  [modem0] state changed (enabled -> registered)
Apr 01 17:05:04 mobian ModemManager[600]: <info>  [modem0/call1] call state changed: dialing -> ringing-out (unknown)
Apr 01 17:05:05 mobian ModemManager[600]: <info>  [modem0/call1] call state changed: ringing-out -> active (unknown)
Apr 01 17:05:07 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (home -> idle)
Apr 01 17:05:07 mobian ModemManager[600]: <info>  [modem0] state changed (registered -> enabled)
Apr 01 17:05:07 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (idle -> registering)
Apr 01 17:05:07 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Apr 01 17:05:07 mobian ModemManager[600]: <info>  [modem0] state changed (enabled -> registered)
Apr 01 17:05:55 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (home -> idle)
Apr 01 17:05:55 mobian ModemManager[600]: <info>  [modem0] state changed (registered -> enabled)
Apr 01 17:05:55 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (idle -> registering)
Apr 01 17:05:55 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Apr 01 17:05:55 mobian ModemManager[600]: <info>  [modem0] state changed (enabled -> registered)
Apr 01 17:05:58 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (home -> idle)
Apr 01 17:05:58 mobian ModemManager[600]: <info>  [modem0] state changed (registered -> enabled)
Apr 01 17:05:58 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (idle -> registering)
Apr 01 17:05:58 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Apr 01 17:05:58 mobian ModemManager[600]: <info>  [modem0] state changed (enabled -> registered)
Apr 01 17:06:00 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (home -> idle)
Apr 01 17:06:00 mobian ModemManager[600]: <info>  [modem0] state changed (registered -> enabled)
Apr 01 17:06:00 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (idle -> registering)
Apr 01 17:06:00 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Apr 01 17:06:00 mobian ModemManager[600]: <info>  [modem0] state changed (enabled -> registered)
Apr 01 17:06:19 mobian ModemManager[600]: <info>  [modem0/call1] call state changed: active -> terminated (unknown)
Apr 01 17:06:29 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (home -> searching)
Apr 01 17:06:29 mobian ModemManager[600]: <info>  [modem0] state changed (registered -> searching)
Apr 01 17:06:29 mobian ModemManager[600]: <warn>  [modem0] couldn't load operator code: Current operator MCC/MNC is still unknown
Apr 01 17:06:29 mobian ModemManager[600]: <warn>  [modem0] couldn't load operator name: Current operator id is still unknown
Apr 01 17:07:02 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (searching -> idle)
Apr 01 17:07:02 mobian ModemManager[600]: <info>  [modem0] state changed (searching -> enabled)
Apr 01 17:07:02 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (idle -> registering)
Apr 01 17:07:02 mobian ModemManager[600]: <info>  [modem0] 3GPP registration state changed (registering -> home)
Apr 01 17:07:02 mobian ModemManager[600]: <info>  [modem0] state changed (enabled -> registered)


  Android 11 4k HDR
Posted by: shaggy013 - 04-01-2022, 08:15 AM - Forum: Android on Quartz64 - Replies (6)

Android 11.2

build with a more recent sdk for android 11

working
HDMI
4k
HDR
lan , wifi
sata (first format it through usb )
usb
ir ?

Playstore works so you can udate and add programs  it is a older playstore so sure it updates Smile but it works to normal update android
like youtube kodi etc included
added leanback launcher to have a little box experiece with the tablet build .

todo

cec ( it works in a box build , but i have no gtsv to make playstore work)
and some cosmetics to make it look nice

this is a gpt image wich  you can flash for example with etcher on a sd or emmc

https://drive.google.com/file/d/1PughXW8...sp=sharing

minimal 16gb sd/emmc

i wanted to clean it up some more but somehow my clock runaway from my board , so i cannot update it right away but thought i should at least share it


Sad Support response times
Posted by: chuso - 04-01-2022, 04:53 AM - Forum: General - Replies (5)

Hi,

Does anyone know how long it usually takes to get a response from support?

I opened a support ticket 10 days ago and I haven't received any response yet.


Question Where do i check/post/report bugs/issues with the software? (or hardware?)
Posted by: nande - 04-01-2022, 12:51 AM - Forum: General Discussion of PinePhone Pro - Replies (4)

Hello everyone,
I've read the forum rules (ofc i did ofc), and it mentions that bugs should be reported to the project repo (which makes sense to me).
I'd like to report the bugs that i find, and check the status of the ones reported (maybe what i find is already reported).
I have no idea where are those repos located. Can someone give me a url?
Im using manjaro+plasma on pinephone pro (and i love them (well im used to debian instead of manjaro, but so far is great)).
 Thanks!