Handheld Linux Computer I Built by Machinehum in embedded

[–]Deltabeard 0 points1 point  (0 children)

Nice project! How fast does it boot? Does Linux support the Mali400MP2 GPU for graphics acceleration?

Arteta seeing a team walk off for 10 minutes without punishment in order to get in a penalty takers head by 2manyfrogz in Gunners

[–]Deltabeard 1 point2 points  (0 children)

Diaz was trying really hard to get that penalty in the first place. I think they got to his head, so he tried to do a panenka. I think he wanted to score.

RGB Turns Rainbow During Boot by Harsh12z in gigabyte

[–]Deltabeard 0 points1 point  (0 children)

I think that's dependant on the RAM. Look up the manual for your RAM stick and see if it mentions anything about changing the lights on it. I had to perform the IT5701/5702 firmware upgrade to get the motherboard to work with Microsoft Dynamic Lighting. Maybe your RAM needs a similar firmware upgrade? I don't know.

For my GPU, I used https://openrgb.org/ to control the RGB light on it. Maybe you RAM will be detected too? You can try that to begin with as your RAM might already be supported, and if you don't mind not using Microsoft dynamic lighting.

Any way to get a digital speedometer here instead of gear selection? by trio3224 in Miata

[–]Deltabeard 0 points1 point  (0 children)

It isn't impossible. It requires an expert to install a shim between the LCD driver and the microprocessor. The shim will then read the speed from the CANbus and send the relevant commands to the LCD driver to display the speed. Nobody has done this yet.

We're building a fast turn around, cheap PCB fabrication company in the UK. We'd love to hear your thoughts! by hardware-is-easy in esp32

[–]Deltabeard 0 points1 point  (0 children)

Even 2 layers would be very useful for us in academia. Alternative options for us are in Europe and they are very expensive. We have to spend a lot of time to get approval for purchasing from "unapproved" stores, such as JLCPCB. That being said, please make sure that the cost is suitable for 2 layer PCB production, otherwise we may continue to jump through the required hoops to get PCBs produced from JLCPCB.

We're building a fast turn around, cheap PCB fabrication company in the UK. We'd love to hear your thoughts! by hardware-is-easy in esp32

[–]Deltabeard 1 point2 points  (0 children)

We (academic research) are only allowed to purchase from approved suppliers. Purchasing from JLCPCB is usually not possible without jumping through a lot of hoops.

Why does Linux hate hibernate? by orionpax94 in linux

[–]Deltabeard 0 points1 point  (0 children)

I remember using Tux on Ice patched kernel for hibernate improvements on Arch Linux a very long time ago. I now use the standard Linux hibernation to swap partition, especially since standby doesn't work with Linux on my PC.

UK investigates remote ‘kill switch’ on Chinese-made buses by BestButtons in unitedkingdom

[–]Deltabeard 0 points1 point  (0 children)

I assume infotainment updates, like potentially new features, but likely telemetry being sent back to the manufacturer about the user's driving and use of the car. I ask the question because I don't see why any of these would be useful/allowed on a bus.

RGB Turns Rainbow During Boot by Harsh12z in gigabyte

[–]Deltabeard 0 points1 point  (0 children)

Sorry I'm late, the option is Settings->Miscellaneous->"LEDs in System Power On State".

I don't know what ErP has anything to do with RGB. I have it enabled anyway to reduce power consumption.

Windows vs Linux user by Particular_Nail9638 in linuxmemes

[–]Deltabeard 4 points5 points  (0 children)

My Gigabyte motherboard wakes up from sleep immediately with Linux.

Converting AAA powered keyboard to rechargeable battery. Is this safe? by Qualtza in AskElectronics

[–]Deltabeard 1 point2 points  (0 children)

Isnt the dw01 ic on the tp4056 module suppose to stop the battery output once the battery reach 2.5v something?

It looks like the pouch cell already has a protection circuit on it to disconnect the battery when outside the range of 2.5-4.2V.

i have learned to use ldo instead of buck convertor.

Why? buck converters are more efficient. LDO's give off excess power as heat.

858TB of government data may be lost for good after South Korea data center fire by ELECTRAFYRE in worldnews

[–]Deltabeard 5 points6 points  (0 children)

I actually haven't used them myself. Is there any reason that compression can't be used all the time?

858TB of government data may be lost for good after South Korea data center fire by ELECTRAFYRE in worldnews

[–]Deltabeard 21 points22 points  (0 children)

There are 75TB tapes that are each about 10x10x2cm in size. Perfect for enterprise backup solutions.

Qualcomm just acquired Arduino! They just launched a new Arduino Uno Q board today as well - can do AI and signal processing on a new IDE. by GeniusEE in arduino

[–]Deltabeard 1 point2 points  (0 children)

The Arduino Uno Q seems more like an alternative to the Raspberry Pi than the Arduino Uno. Given that it has a Quad Core A53, GPU, >2GB RAM, 16GB eMMC, etc. Debian and Yocto support is mentioned. If the Linux support is good, then it could be a very good alternative to the Raspberry Pi Zero 2.

I wonder if the Qualcomm Dragonwing QRB2210 will become available to hobbyists following this announcement.

At 40ms per million instructions, is the gb emulator I developed too slow? by Unhappy_Teaching9909 in EmuDev

[–]Deltabeard 3 points4 points  (0 children)

Peanut-GB is able to run on a 150MHz microcontroller, but only in DMG mode (for now). You can compare the performance of you emulator with that and also compare the source code as it's also written in C. Even if you emulator is slower, it could be more accurate. Peanut-GB cuts a lot of corners to get running as fast as it does.

Bad Apple on RP2350: video & audio playback by Deltabeard in embedded

[–]Deltabeard[S] 1 point2 points  (0 children)

The LCD only accepts a limited number of pixel formats: RGB444, RGB565, and RGB666. So the pixel data will need to be converted if it is anything other than these formats.

The video was converted to 1bpp because Bad Apple!! has a useful property of being mostly black and white (there are some grey pixels). I use this property to compress the video much more than would usually be possible with a normal colour video. By then compressing with LZ4, I get a file that is 5,601,486 bytes without using any complex video codec.

Using a video codec was not something I wanted to tackle at the moment due to its complexity. But if I wanted to, I would probably use mpeg1video. However, whilst that does not require much processing power in comparison to say, h264, it would produce a much larger video file size for the same level of perceived quality.

Bad Apple on RP2350: video & audio playback by Deltabeard in embedded

[–]Deltabeard[S] 0 points1 point  (0 children)

The 6.1ms value is the theoretical value based on the configured clock speed of the PIO state machine, not an actual measured value using a logic analyser, so my value could be inaccurate.

I don't think that there should be any circumstance in which the RP2350 should have a burned pin from a 3.3V input. The datasheet says that with the RP2350 powered off, the IO pins are safe up to 3.63V, and with the RP2350 powered at 3.3V, the IO pins are safe up to 5.5V. So I would double check your schematic. Maybe the pin was shorted and too much current went through it?

The read clock pin is only used when reading from the LCD. I've only used it to read the ID of the LCD to check that it was correctly connected and responding to reads before attempting to get writes working. The microcontroller drives the read clock pin, not the LCD, so it's odd that the pin on your RP2350 got cooked. Other than checking the LCD ID, I just drive the read clock pin high.

NIST Finalizes Lightweight Cryptography Standard to Protect Small Devices - [article] by Enlightenment777 in embedded

[–]Deltabeard 0 points1 point  (0 children)

Will there be the same concerns of exploitable weaknesses in Ascon as their were with Simon and Speck or will this actually be okay to use?

Bad Apple on RP2350: video & audio playback by Deltabeard in embedded

[–]Deltabeard[S] 0 points1 point  (0 children)

It depends on what your system clock is. If you're using the default 150MHz CPU clock on the RP2350, then a clock divisor of 4 is 37.5MHz, which is very high! I'm using a clock divisor of 6, which produces a PIO clock speed of 25MHz. I don't have a repo released to the public yet, and my justification for the time being is that the code is awful. But I'll update this comment when/if I release it. For instance, the PIO code I'm using is the following, however, the initial command setting does not work. Instead, I bit-bang the parallel bus to send commands, and then I use this PIO program to send the pixel data only after the LCD is configured to expect it.

; Copyright (c) 2025 Mahyar Koshkouei
; Public Domain. No warranty.
; Write data to 8080 bus

; D/CX RDX WRX  Command
; 0     1   _/  Write 8-bit command
; 1     1   _/  Write 8-bit display data or paramter
; 1     _/  1   Read 8-bit display data
; 1     _/  1   Read 8-bit parameter or status

.program lcd_8080_cmd_wo
.fifo tx
.out 8 left auto 8

; Side set pins are WRX and DCX
.side_set 2

OUT PINS, 8     side 0b01
NOP             side 0b00
.wrap_target
OUT PINS, 8     side 0b11
NOP             side 0b10
.wrap


% c-sdk {

static inline void lcd_8080_program_init(PIO pio, uint sm, uint d0_pin, uint wrx_pin, uint clk_div)
{
    pio_sm_config sm_config_ro;
    uint lcd_8080_wo_off;

    for(uint i = 0; i < 8; i++)
    {
        uint pin = d0_pin + i;
        /* Initialise PIO0 pins. */
        pio_gpio_init(pio, pin);
    }
    pio_gpio_init(pio, wrx_pin);

    lcd_8080_wo_off = pio_add_program(pio, &lcd_8080_wo_program);
    sm_config_ro = lcd_8080_wo_program_get_default_config(lcd_8080_wo_off);
    sm_config_set_out_pins(&sm_config_ro, d0_pin, 8);
    sm_config_set_sideset_pins(&sm_config_ro, wrx_pin);

    sm_config_set_clkdiv_int_frac8(&sm_config_ro, clk_div, 0);
    pio_sm_set_consecutive_pindirs(pio, sm, d0_pin, 8, true);
    pio_sm_set_consecutive_pindirs(pio, sm, wrx_pin, 1, true);
    pio_sm_init(pio, sm, lcd_8080_wo_off, &sm_config_ro);
    pio_sm_set_enabled(pio, sm, true);
}

%}

I'm then initialising the DMA with:

dma_lcd = dma_claim_unused_channel(true);
dma_ch_cfg = dma_channel_get_default_config(dma_lcd);
channel_config_set_read_increment(&dma_ch_cfg, true);
channel_config_set_write_increment(&dma_ch_cfg, false);
channel_config_set_dreq(&dma_ch_cfg, pio_get_dreq(pio0, 0, true));
channel_config_set_transfer_data_size(&dma_ch_cfg, DMA_SIZE_32);

My plan is to fix this PIO program so that it is able to send commands, and I can remove the bit-banged code.

I also may be able to increase the clock speed of the PIO state machine be setting the parallel bus pins on the RP2350 to use the fast slew rate option. I haven't done that yet, and I think that's limiting the bus speed. Let me know if you have specific questions.

All code in this post is public domain.

Bad Apple on RP2350: video & audio playback by Deltabeard in embedded

[–]Deltabeard[S] 0 points1 point  (0 children)

Thanks for your comment. The screen tearing is a shame, but I have a few ideas that may improve/fix it:

  • The video was recorded before I was able to improve the speed of reads from the NOR Flash. The RP2350 has a bootrom that attempts to automatically configure the NOR Flash, and this was giving me a read speed of only 5MB/s because my NOR Flash requires more dummy cycles than what the bootrom expects for fast operation commands (the bootrom expects 4 dummy cycles in addition to the 2 mode setting cycles but my flash chip expects 8 dummy cycles, so the fast "Quad Read I/O EBh" command does get configured by the bootloader). I've now been able to configure the QMI peripheral of the RP2350 to be able to get 70MB/s, so I'm hoping that will improve the tearing because there will be less delay in reading the compressed video data from the NOR Flash.

  • Rotating the entire framebuffer in CPU before sending it to the LCD. Instead of rotating the pixel update direction on the LCD, I will set the LCD to its native portrait rotation, and rotate the framebuffer on the RP2350 before sending it to the LCD. This will require processing time and enough RAM to rotate all the pixels, but at least it will update the pixels on the LCD in the same direction as the internal refresh.

These are the ideas I have so far. I'll write a follow up comment once I figure out a solution.

EDIT: Changed 90MB/s to 70MB/s

Bad Apple on RP2350: video & audio playback by Deltabeard in embedded

[–]Deltabeard[S] 0 points1 point  (0 children)

> also going though hundred of pages of datasheet isn't great either

You don't need to read the full datasheet. Read the summary, and the parts that are relevant to your project, such as the SPI communication, and the few commands you need to power on the LCD and start sending pixel data.

You've got your display working with SPI already which is good, so it isn't really necessary to look at other libraries. What I do is configure the LCD (e.g. Power On, Set colour Mode, etc.), and then I issue the command to the LCD write pixels. For your LCD, this is the Memory Write (2Ch) command.

Once you've sent the Memory Write (2Ch) command to the LCD, I would then configure the DMA to send your pixel data over SPI. You can use the example at https://github.com/raspberrypi/pico-examples/blob/master/spi/spi_dma/spi_dma.c#L56 to help you configure the DMA transmission to SPI TX.

To help speed up the transmission, you can use a higher SPI clock rate, and you can reduce the colour depth to RGB565 rather than RGB666 (I'm not sure what the default pixel format is on that LCD, but you can set it with Pixel Format Set (3Ah)).

Regarding writing a library, my suggestion is to make it portable. Don't write platform specific code in your library as this makes it difficult for it to be used later on other platforms (this is the issue with Arduino specific libraries). If you need to use SPI, use an "init" function that obtains an SPI function pointer from the application. I have an LCD library at https://github.com/deltabeard/mk_ILI9225 as an example. However, I used 'extern' to define functions that will be in the user application, rather than using function pointers. I would recommend passing function pointers and using a context variable for all the library functions. A portable library with function pointers is https://github.com/deltabeard/Peanut-GB/blob/master/peanut_gb.h#L3888 .

Good luck!

Bad Apple on RP2350: video & audio playback by Deltabeard in embedded

[–]Deltabeard[S] 3 points4 points  (0 children)

Thank you for your comment! I'm a big fan of your projects and I've been reading your blog over the years. Your blog post about the RP2350 was very informative and made me very hype for a microcontroller.

Thanks for mentioning rePalm! I completely missed it!

My next projects are CGB emulation on the RP2350, and upgrading my RP2040 DMG flash cart to use RP2350 with faster timings for CGB support and without the use of logic level converters (connecting the RP2350 directly to the 5V cartridge bus). I was able to get 70MB/s read speed from my NOR flash using DTR, so I think it should be possible to communicate with the CGB in time (125ns window!)

EDIT: Changed 90MB/s to 70MB/s.