Go to advanced search

by MaK11-12
Sun Oct 31, 2021 5:41 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

In the loop_forever function at https://github.com/deltabeard/DBGC/blob/edd5a9a5645febe7b7377506ca55d4924b863923/sw/gb_manager/src/rp2040.c#L768 I'm expecting that function (and hence core0) to only be executing from RAM. Only sleep_ms and i2c_write_blocking are called in that function, and both ar...
by MaK11-12
Sat Oct 30, 2021 11:45 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

I have set i2c_read_blocking_internal and i2c_write_blocking_internal to run from RAM using __no_inline_not_in_flash_func . I haven't a use for the 16KiB RAM in the XIP cache currently. What else did you update? That is not the only thing. In the loop_forever function at https://github.com/deltabea...
by MaK11-12
Sat Oct 30, 2021 11:40 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

function attributes are not inherited by functions you call (unless they are inlined), so the i2c_ functions are still in flash... simplest solution is probably to just copy the functions you need and add not_in_flash (or __force_line) attributes p.s. always worth looking at the generated .DIS file...
by MaK11-12
Sat Oct 30, 2021 11:33 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

Firmware size, 256kb it could also be feasible to just set the entire binary as copy-to-ram? then code will never contest with flash access I'm currently pushing changes to the v0.3 branch at https://github.com/deltabeard/DBGC/tree/v0.3 which states that the ROM has to be selected at compile time. ...
by MaK11-12
Sat Oct 30, 2021 10:54 pm
Forum: SDK
Topic: Different crystal frequency
Replies: 8
Views: 493

Re: Different crystal frequency

Hello.

According to the datasheet section 2.16 "Crystal Oscillator (XOSC)", the external crystal oscillator must be between 1 MHz - 15 MHz.
by MaK11-12
Sat Oct 30, 2021 10:04 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

Hi everyone, Since last time I've managed to achieve flash access fast enough for Game Boy ROM access. I have also released the source code of my project under a permissive open source license at https://github.com/deltabeard/DBGC . The next feature I'm working on is non-volatile save support. A 32K...
by MaK11-12
Wed Oct 20, 2021 10:39 am
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

Read: You 0x0000-0x3FFF flash range from a15 may have enough time. Your 0x4000-0x7FFF flash range from a15 is possibly too much. Your 0xA000-0xBFFF RAM range from a15/ncs may have enough time. Write: You 0x0000-0x7FFF rom range from a15 may have enough time. Your 0xA000-0xBFFF RAM range from a15/nc...
by MaK11-12
Tue Oct 19, 2021 9:59 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

Thsi si the code I mentioned you will want to see the assembler for. data = rom[address]; 200004b6: 9b03 ldr r3, [sp, #12] 200004b8: 0c24 lsrs r4, r4, #16 That really doesn't look like the correct/or complete code; worse it looks like it may be non-optimized (hard to tell from two instructions)!? m...
by MaK11-12
Tue Oct 19, 2021 9:19 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

Thank you for all of the replies. :) Avoid things that would take additional time. Like function calls, stack management, variable stuff, etc. I've optimised my code further to only perform tasks required for the specific game being played. When a game is loaded, a specific function is called that o...
by MaK11-12
Mon Oct 18, 2021 8:30 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

Thanks for the swift response again. You are going to want to tune this function as much as possible. The bus logic is in it's own small loop from RAM, and running on the second CPU core. I don't know what "Tight super loop" is though? My loop is small and infinite. Increasing the clock di...
by MaK11-12
Mon Oct 18, 2021 7:16 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Re: Achieving the fastest flash read speed

Thanks for the quick response! Are you certain that it is issuing an 0xEB command (Fast Read Quad I/O), rather than a 0x6B command (Fast Read Quad Output) ? The boot2_w25q080.S boot_stage2 is used, which issues the 0xEB command. PICO_FLASH_SPI_CLKDIV is also set to 2. My code does not create a QSPI ...
by MaK11-12
Mon Oct 18, 2021 4:34 pm
Forum: General
Topic: Achieving the fastest flash read speed
Replies: 32
Views: 1566

Achieving the fastest flash read speed

Hello. I am using the RP2040 in a hobby project, where it is connected to, and communicates with a parallel IO bus (it's connected to a Game Boy and the RP2040 acts as a game cartridge). I'm having a problem whereby reading from the NOR flash (W25Q128JV[1]) is sometimes too slow to keep up with the ...
by MaK11-12
Tue Sep 28, 2021 9:09 am
Forum: Other RP2040 boards
Topic: Unknown USB Device (Device Descriptor Request Failed) on Custom RP2040 Board
Replies: 1
Views: 510

Re: Unknown USB Device (Device Descriptor Request Failed) on Custom RP2040 Board

Looking at the image below, it can be seen that "D-" is connected to USB_DP, and "D+" is connected to USB_DN.

Image

I've bodged in a USB Type-B port and can verify that the circuit works.
by MaK11-12
Mon Sep 27, 2021 4:55 pm
Forum: Other RP2040 boards
Topic: Unknown USB Device (Device Descriptor Request Failed) on Custom RP2040 Board
Replies: 1
Views: 510

Unknown USB Device (Device Descriptor Request Failed) on Custom RP2040 Board

Hi all, I have designed and assembled a custom RP2040 board that produces the error "Device Descriptor Request Failed" on Windows ( https://i.imgur.com/dA044sh.png ), and a similar error on Linux. There are no problems with the 3.3V input and the RP2040 is correctly producing 1.1V. I have ...
by MaK11-12
Sun Nov 12, 2017 6:50 pm
Forum: Compute Module
Topic: Schematic Design Feedback
Replies: 0
Views: 775

Schematic Design Feedback

Hi all, I'm making an open source compute module development board here: https://github.com/deltabeard/cmio . I've finished completing the third iteration of the board, but the composite video and the SD card slot do not work - my computer detects the board however when connected via USB. Since the ...
by MaK11-12
Wed Mar 29, 2017 4:32 pm
Forum: Compute Module
Topic: I2S and DPI possible simultaneously?
Replies: 3
Views: 1926

Re: I2S and DPI possible simultaneously?

Yes. A bit of devicetree hackery is required, though. For example the downstream DT for the compute module: https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/boot/dts/bcm2708-rpi-cm.dts#L34 Change the pins_i2s node definition to gpio 28-31 ALT2 instead of 18-21 ALT0 and build the kernel ...
by MaK11-12
Wed Mar 29, 2017 3:53 pm
Forum: Compute Module
Topic: I2S and DPI possible simultaneously?
Replies: 3
Views: 1926

I2S and DPI possible simultaneously?

Hi all, Regarding the Compute Module 3, is it possible to use an I2S audio codec IC such as the PCM5102 on GPIO Bank 1 instead of Bank 0? I was hoping to use all the pins of Bank 0 for 24 bit DPI functionality. Therefore, using I2S on Bank 1 would be great. I'm using the compute module datasheet her...
by MaK11-12
Wed May 27, 2015 11:18 am
Forum: Other projects
Topic: Modifying a 3.5" car display for USB power.
Replies: 453
Views: 267564

Re: Modifying a 3.5" car display for USB power.

Perhaps you could break into the line, add a transistor and use PWM to reduce the brightness? I've never used transistors before, so I'm unsure how your idea would work. Would I connect the 21.6V input and a PWM signal to the transistor, and the transistor would then output a voltage depending on t...
by MaK11-12
Wed May 27, 2015 10:58 am
Forum: Other projects
Topic: Modifying a 3.5" car display for USB power.
Replies: 453
Views: 267564

Re: Modifying a 3.5" car display for USB power.

Has anyone had any luck in changing the backlight brightness level? I found that the voltage going to the 'K' and 'A' pins (the pins going to the backlight) on my 3.5" In-car LCD was a whopping 21.6V! This was whilst powering the LCD with 5V input after modding it with the instructions found in...
by MaK11-12
Sat Mar 28, 2015 10:06 am
Forum: Troubleshooting
Topic: RTC clock
Replies: 9
Views: 4787

Re: RTC clock

I am also having problems with the DS3231 RTC. It's the same one that OP is using. I have used two so far thinking that the first one was broken, but now I believe it is a software issue. I bought my DS3231 from http://www.ebay.co.uk/itm/291394777661?_trksid=p2059210.m2749.l2649&var=590503201102...
by MaK11-12
Tue Feb 17, 2015 3:42 pm
Forum: Beginners
Topic: Changing volume using potentiometer
Replies: 5
Views: 7503

Re: Changing volume using potentiometer

I'm surprised nobody else picked up on this: your 3rd circuit seems to show an RPi GPIO pin used as an analog input. The RPi does not have any analog circuitry, such as the ADC that you need to make this idea work. So you need to get a ADC chip or one of the many GPIO add-on boards that have them. ...
by MaK11-12
Tue Feb 17, 2015 2:24 pm
Forum: Beginners
Topic: Changing volume using potentiometer
Replies: 5
Views: 7503

Re: Changing volume using potentiometer

1. You should use all 3 contacts of a volume control pot. Put the input audio and ground across the full track and take the controlled output from the slider and ground. The impedance of the following amp should be at least several times higher than the pot's resistance. I will be connecting ground...
by MaK11-12
Tue Feb 17, 2015 10:22 am
Forum: Beginners
Topic: Changing volume using potentiometer
Replies: 5
Views: 7503

Changing volume using potentiometer

Hello all. I'm making my own portable game console using the Raspberry Pi A+. Currently, I am trying to found out how I'll be able to change the volume of the headphone output and the internal speaker that I will have installed. I would like the volume to be changed using a potentiometer rather than...
by MaK11-12
Fri Feb 06, 2015 8:13 am
Forum: Advanced users
Topic: 3.6" TFT fbtft help
Replies: 3
Views: 3027

Re: 3.6" TFT fbtft help

FBTFT won't work with this display. If you look in spi_graphical.h, it mentions MCP23017. This is a SPI to 16-bit I/O expander. They drive a parallel interfaced LCD controller entirely through SPI. It resembles spritemods circuit in function: http://spritesmods.com/?art=spitft&page=2 :snip: Tha...
by MaK11-12
Thu Feb 05, 2015 5:41 pm
Forum: Advanced users
Topic: 3.6" TFT fbtft help
Replies: 3
Views: 3027

3.6" TFT fbtft help

Hi everyone. I have a new 3.6" LCD that I have ordered from (dun dun dun) China. There is an SD card image that I found that works with the LCD. As in, /dev/fb0 is the LCD. The problem is that omxplayer or retroarch do not work. The only way to get them to work is if there is /dev/fb0 and /dev/...

Go to advanced search