Custom JSON Digital I/O on Patch_SM

Hi, I am working with a custom board for Patch_SM and Oopsy. I’m testing with the below minimal JSON in Oopsy and nothing is output on the pins. If I use the default gate out pins, B5 and B6, this code works - so I assume the component defs file is correct for those pins, but not for the peripheral GPIO pins, or the pin mapping is incorrect? Any help much appreciated.

The component defs file for the seed seems to be much further developed. Are there limitations to custom boards with Patch_SM? I see that the SD GPIO pins have external pull-up resistors on the Patch_SM schematic for example. I could swap hardware to the seed, but my application requires the DC coupled outputs of the Patch_SM, the new data sheet for the seed says the outputs are AC coupled, is this due to the change in codec output stage?

{
    "name": "gate_test",
    "som": "patch_sm",
    "audio": {"channels": 2},
    "components": {
        "gate_out_1": {
            "component": "GateOut",
            "pin": "A9",
            "display": "",
            "is_default": true
        },
        "gate_out_2": {
            "component": "GateOut",
            "pin": "A8",
            "display": "",
            "is_default": true
        }
    }
}

I apologize for the confusion! The problem here is the is_default property. That indicates that this component exists “for free” in the underlying board code, in this case the PatchSM class in C++. For pins that are otherwise not used, removing that property (or setting it to false) should resolve the issue.

Hi @Corvus_Prudens ,

Thanks for getting back to me - I’ve worked some more on this and still can’t get the GPIO pins on patch_sm to function. It gets weirder in that flashing the above JSON onto a patch_init, with is_default: false the gate outputs still come out of the default pins B5 and B6, no matter what I set the pins to in the JSON file. Is there an underlying issue with changing the default mapping on patch_sm / patch_init and Oopsy? I am running the bootloader additions branch of Oopsy.

Yeah, I’ve tried adding extra gate outputs to this minimal test, including the default gate output pins and I get a compiler error when I try to flash. This kind of thing works fine on the daisy seed, but I need the DC coupled outputs of Patch_SM.