September 16, 2025, 02:06:58 PM

Recent posts

#71
New Products release / Re: PICO2-XXL with RP2350 and ...
Last post by raybellis - August 06, 2025, 03:38:10 PM
I've just received an XXL, and it looks like a nice little board.

One minor criticism - while the connector pads are 0.1" spaced, the two separate blocks either side are not themselves aligned on a multiple of 0.1" with each other.  This makes it impossible to use the board with a breadboard or perf board.

For the sake of an additional 0.05" or so of width this could easily be resolved, albeit with the loss of backwards compatibility for the footprint.
#72
A64 / Re: Counting IRQ interrupts on...
Last post by ilario - August 05, 2025, 05:19:59 PM
Finally I managed to have some code that seems working (it has been quite challenging).
As you said, I had to heavily adapt the code taken from the linux-sunxi wiki...

For future reference, here goes the code of the Device Tree overlay:

/dts-v1/;
/plugin/;

&{/soc/pinctrl@1c20800} {
    anemometerirq_pins: anemometerirq_pins {
        pins = "PB4";
        function = "gpio_in";
        bias-pull-up;
    };
};

&{/soc} {
    anemometerobserver {
        compatible = "anemometer-irq";
        pinctrl-names = "default";
        pinctrl-0 = <&anemometerirq_pins>;
        interrupt-parent = <&pio>;
        interrupts = <1 4 2>; // Bank 1, pin 4, IRQ_TYPE_EDGE_FALLING
        //status = "okay";
    };
};

The device tree overlay can be compiled with:

dtc -I dts -O dtb -o sun50i-a64-irq-PB4.dtbo sun50i-a64-irq-PB4.dts
And added it to the fdtoverlays list inside the /boot/uEnv.txt file.

Here the code of the kernel module that claims the IRQ:

#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of_platform.h>

/* Inspired by https://linux-sunxi.org/External_interrupts */

static irqreturn_t anemometer_irq_handler(int irq, void *dev_id)
{
    //printk(KERN_INFO "anemometer_irq: Interrupt received!\n");
    return IRQ_HANDLED;
}

static int anemometer_probe(struct platform_device *pdev)
{
    int irq, ret;

    irq = platform_get_irq (pdev, 0);
    if (irq < 0) {
        printk(KERN_ERR "Failed to get IRQ: %d\n", irq);
        return irq;
    }

    ret = request_threaded_irq(irq, NULL, anemometer_irq_handler,
        IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
        "anemometer-irq", NULL);
    if (ret) {
        dev_err(&pdev->dev, "Failed to request IRQ %d: %d\n", irq, ret);
        return ret;
    }

    dev_info(&pdev->dev, "Anemometer IRQ %d registered successfully\n", irq);
    return 0;
}

static int anemometer_remove(struct platform_device *pdev)
{
    int irq = platform_get_irq(pdev, 0);
    if (irq > 0)
        free_irq(irq, NULL);
    return 0;
}

static const struct of_device_id anemometer_dt_ids[] = {
    { .compatible = "anemometer-irq" },
    { }
};
MODULE_DEVICE_TABLE(of, anemometer_dt_ids);

static struct platform_driver anemometer_driver = {
    .probe  = anemometer_probe,
    .remove = anemometer_remove,
    .driver = {
        .name          = "anemometer-irq",
        .of_match_table = anemometer_dt_ids,
    },
};

module_platform_driver(anemometer_driver);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ilario Gelmetti");
MODULE_DESCRIPTION("Anemometer Switch Monitor");

And here the content of the Makefile file for compiling the kernel module:

obj-m += anemometer-irq.o

all:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

And it can be compiled with:

make
(I had many missing imports, so I had to install a kernel compiled locally).

After importing the module with:

insmod anemometer-irq.ko
You should see the PB4 pin claimed by that module:

# grep PB4 /sys/kernel/debug/pinctrl/1c20800.pinctrl/pinmux-pins
pin 36 (PB4): device soc:anemometerobserver function gpio_in group PB4



#73
Neo6502 / Re: About Apple II emulator an...
Last post by Ralf - August 04, 2025, 10:41:59 PM
Yeah, like I said, that's a known problem.
It has to do with the tinyUSB library used, which somehow only works with certain chipsets. It's been reported, though, so it might be fixed in the future.
#74
Neo6502 / Re: About Apple II emulator an...
Last post by stingrayce1982@gmail.com - August 04, 2025, 10:00:31 PM
I tried two powered hubs, one was a DLINK brand and the other was no-name.  Neither of them worked.
#75
Neo6502 / Re: Oric Atmos .uf2 firmware
Last post by stingrayce1982@gmail.com - August 04, 2025, 09:54:11 PM
Thanks Ralf. 

I managed to get it to boot properly, figured out how to load the OS (call 800) and change floppy (f1-f9) and run a program (-{program_name}).

Can anyone tell me how to access software from a USB Flash drive (key)?
#76
Neo6502 / Re: Joystick or Paddles
Last post by Ralf - August 04, 2025, 07:38:18 PM
I might be mistaken, but I think that only works with the Morpheus firmware.

However, one of the guys at the discord might know more:
https://discord.gg/tTtarCcrzf
#77
Neo6502 / Re: About Apple II emulator an...
Last post by Ralf - August 04, 2025, 07:00:15 PM
Quote from: stingrayce1982@gmail.com on August 03, 2025, 09:16:41 PMOne thing I found is that some of the USB Hubs I tried worked fine for the Keyboard alone but didn't work when I added the USB Key.


The thing with the USB hubs is that, on one side, there is an issue with the hub's controller chip communicating with the board. However, on the other side, the Pi Pico does not supply much power out of its USB port, so I assume it is beneficial to use a powered USB hub.
#78
Neo6502 / Re: Problems reading USB drive...
Last post by Ralf - August 04, 2025, 06:50:59 PM
That's a cool idea. Let us know how it goes. :-)
#80
A64 / HDMI: A64 Board not detecting ...
Last post by a7med3365 - August 04, 2025, 01:30:31 PM
Im using A64-OLinuXino-2Ge16G-IND, with A64-OLinuXino-bullseye-base-20231106-081613.img.7z

We had one board that we were using for sometime and it was working smoothly with multiple monitors.
Then we bought another one, same specs and installed the same image, but we are facing issues with the hdmi resolution. the board for some reason is not detecting the monitor resolution and aspect ratio automatically. it display low resolution. and i need to unplug the hdmi multiple times until the board randomly gets adjusted to the max resolution available.

is it a firmware/drivers issue? or a hardware issue?

please suggest ways to resolve this, i tried multiple fixes i found online for Linux boards in general but nothing seems to work.

thank you and best regards