Hey, everybody, I am brand new to this ada fruit stuff. I am trying to build a portable retro pie handheld and I need contact audio amplifiers to give reliable sound. But I'm not sure how the boards work. How do you adjust the volume on boards like the tpa2016? I'm trying to put together a parts list, but I'm not sure what parts to buy.
#general-chat
1 messages · Page 57 of 1
Actually, if there was a list of products that are useful for my build, I would like to check them out. Thank you!
do you mean a transducer?
Something like this? https://www.adafruit.com/product/1784
To adjust the volume you'd need some type of external input like a rotary encoder or 2 volume buttons.
# Setup your I2C bus and pins for the TPA
# Set initial gain levels
tpa.max_gain = 0
tpa.fixed_gain = 0
# volume up/down
if button1 pressed:
tpa.max_gain -=1
if button2 pressed:
tpa.max_gain +=1
``` something like that
disclaimer: not a working example, theory example only.
Could also do fancy (branch-less and 1 line shorter) with:
gain += pressed (and -=)
also recommend reading the learn guide: https://learn.adafruit.com/adafruit-tpa2016-2-8w-agc-stereo-audio-amplifier/python-circuitpython
Ie: Not pressed >> false >> 0
yeah they need better examples for a basic real world demo... this is disappointing to see
That's a cool ampifier though. Includes parameters for attack, release, noise gate, etc.. https://docs.circuitpython.org/projects/tpa2016/en/latest/
aight so most of my menu is complete but there is one thing
i need to figure out
how can i declare the menu outside of the setup function
i tried to do it by just declaring it at the top
then i declared a pointer to one
and that didn't work
wait i might have figured it out
nevermind i haven't
magic
if this OLED was 2px taller i swear
that would make my life so much easier
there is 16px of yellow
and 48 px of blue
and each of my menu items are 10px tall
i might make them 12 px tall so i dont have to deal with the issue
^^ I have like 4 of these. Yeah small, but love the price. Quite useful. I use my larger Ada OLEDs and TFTs for more permanent fancy projects 😀 Gotta draw the spending line somewhere...
lmao fair
i need to figure out how to navigate the menu now
like i can do it already
i programmed navigation
and that works, i set it to delay 1000 then nav down
to test
but i need to figure out how to call that function on the press of a button
i tried an interrupt
but that just gave me a massive stack dump
maybe you can't write to the screen during an interrupt
well it stack dumped before i called the interrupt
ah lol 😭
is there a way to run code while a condition is true but only run it once
im thinking if i digital read the pin
kinda like unreal engine's Do Once blueprint
oh also, interrupts dont let you call functions from pointers
you can have a global to record which button was pressed, update the global during the interrupt, and leave the interrupt handler; this is unlikely to trigger the watchdog
oh so like make it set a variable to true
then in the loop if the bool is true
set it to false
and move the menu
Moving menu stuff etc etc should be done outside the interrupt handler
noted
maybe
if(condition && globalVar){
doThing();
globalVar = false;
} else if(!condition){
globalVar = true;
}
Basically have a boolean that you set to false once you did the thing once. And then when the condition is false again, reset that boolean to true
Only the bare minimum code should be inside an interrupt
Because essentially you are under a timer
yeah i knew that but i totally forgot that i was drawing the OLED in that function
Hey folks, general Adafruit question here. Recently I found when trying to log in a message saying my account is “banned until: indefinitely”. They’ve given me no methods to contest the banning.
I’ve reached out to support@adafruit.com about 3 times in the last month and it’s just a black hole. There is not a phone number on the site I can call to be like ‘yes I’m a human and no I haven’t behaved badly.” Being as my activities on their website consist 100% of reading tutorials and buying stuff I’m very confident blocking was an error.
Anyways, do any of you have advice how to get in touch with a human at Adafruit to restore an unjustly banned account?
Does it actually "banned", or "access denied" or something else? Is there any more information on the screen?
It says banned, just a one sentence statement.
Can i take a function generator and reprogramm it?
wdym?
It doesnt have waves in it but the output IS perfect
wdym doesn't have waves in it
im lost
someone else is probably got a better idea of what you mean
Sine, cos and stuff like that
Can you rephrase your main question, by being more exchaustive as possible? I have no idea of what are you talking about either
Make an example, may be helpful
i thought you was talking about like someone saying hello
or water
or radiowaves
lmao
I understand
Basic pro function generator -
To show waves because somebody player with the code before
is this hardware or software?
I had 2FA for a while and I go into Microsoft Authenticator app just like normal and now I put in the code and I get the error 'Invalid Authentication Token. Ensure your device's clock is accurate. ' I did change phones since I lasted logged in I think but I'm bringing up my old phone just to try it out.
Any idea or how can I resetup my 2fa
Adafruit? Account >>> Account Settings >>> Security & Privacy >>> Edit two-factor authentication settings
it doesn't allow me to when I put in my password it instantly ask me for my 2fa
maybe with your old phone, then you can change it
didn't work with the old phone auth app either
That's what I was going to ask. The old Wavetek function generators make gorgeous waves, but they do so with carefully designed analog circuitry, nothing to program.
yeah
ha. Looks like another gaming community successfully used "glorbo"
I'm surprised the bots haven't blacklisted the word yet
I wondered what that was all about. It didn't occur to me that it's this year's Snowbonk.
As I am obviously not an AI, and I exhale carbon dioxide periodically like any other normal human.
Sometimes the old waves are still the best waves.
There's very little that's straight in this household...
The message says: “Your account has been banned until: indefinitely”
There is no email traffic from them warning about some behavior. I haven’t interacted with them on any social media besides here in years. I just go on the website and buy stuff and read their learning articles. No comments, no posts in the forum.
possibly banned a range targetted at someone else and you got stuck. have you tried from a different computer on a different internet connection?
hmm
I’ve tried a different computer but not a different location. I usually don’t buy stuff at work.
yeah probably not relevant anyway, as it says this on login i assume,
ISPs sometimes reassign IPs when the do updates. It’s possible you happened to get reassigned a banned IP
Which would be odd
I remember when my parents had centurylink, any time the power in the area went out, we’d get a new IP which messed up my Minecraft servers at the time
for my ISP, it tends to reset if the modem is off for an hour i think
Yeah, it’s definitely not consistent
yeah, every ISP runs by diff rules
I definitely dislike IP based bans for this reason
Ugghh... I'll have to arrange my own internet connection when I move into this new apartment. 😦
But I suspect there’s probably something more buggy going on rather than it being a deliberate ban
I'm hoping the cable work is already done, but I neglected to check that.
Especially if they’re just benign in their overall behavior/interactions
I’m look into switching to a slightly slower but symmetrical speed service from another company that’s much cheaper than I pay currently
somebody has taken up irc spam as a hobby again
and my irc network (with a grand total of 1 user, lol) has been getting hit hard, and IP bans arent event effective, he has too many
Sym would be nice, but needs the download speed. 😛
IP bans make no sense. They aren't the end-all final nuke ban that "gamers" think they are. IP assignments are dynamic unless you pay for a static IP (this used to be common if you wanted to host a website/server); but today there's no real reason not to use a dynamic DNS service.
the spammer even spammed an apology, then kept spamming, lol
I currently pay for 800 ⬇️/ 25 ⬆️
Despite not being very effective, they’re still used
decades ago, i kept evading a wrongful ip ban on an irc network, they gave up trying to get every ip, and filed a false abuse claim to my ISP
then the modem stopped working!
Mostly on broader scales than singular IPs though
Like geoblocking IPs from certain regions
I’m looking to get a 400Mbps symmetrical link that’s fiber
200/50 for me.
If I used more data than that, they charge me $10 per 10GB over
Yeah…
I pay $64/month for 5Mbps DSL with a 150GB cap.
Hence comcrapst (comcast)
Seems like a scam to me.
Someone should tell them that cables don't have a total transfer limit.
i think i had 600/300, plus tv and phone
my dad talked to the isp, and tried to cancel the tv/phone
they somehow talked him into getting a new cable box, 1500/1000, and half the bill
It’s a metered connection meaning their hubs track packet usage into my network
as far as i know, there is no data cap
Though their estimates are always more than what passes into my network server
Last month they said I was nearing my 1.2TB cap, network server said it only registered like 850GB of traffic
I didn't know ISPs actually applied data caps.
the problematic part, 1500mbit down, what cables can handle that? lol
CAT6
Fast ones. 😛
i think the ports on the router are only 1000mbit
an SFP module plugs directly into the router
and the fiber runs into that, for the WAN side
My Dream machine pro has a SFP+ port
$65/month 1Gbps symmetric over fiber, no data caps
Yeah the UDM Pro is pretty great
Though I used all the neat tools for network security so my max will be 3.5Gbps
Gotta have behaviors/interactions to ban someone. Until I discovered this 3 weeks ago it had been over two months since I’d been on the site… when I bought something!
I'm going to be getting an apartment pretty soon, and am hoping to have a server there that connects to my server here at home.
Seems like a mistake that can be fixed. How have you tried to email them? The support form? Direct email?
Two emails, one support form. I waited several days between attempts to contact, but I’m starting to get impatient. There doesn’t seem to be a shortcut to ‘talk to a human’ unless their attention is gained by other means.
Like, what if I want more RP2040’s?
Hmmm
I’m not sure, you might post in #help-with-community
I’m not sure outside of that where you could get more attention 🤷♂️
Just heard a nice sonic boom from the falcon booster re-entry.
Check out this big beefaroni
I wish I had options like that. Where I am, the options are 60/20 from comcrapst, 3/1 from verizon, or ?/? point to point radio link with random fade from Roadstar.
Or really expensive and fairly slow satellite internet from Hughes
Have you thought about getting WISP equipment and renting bandwidth from a local data center
Given that I live in a valley, point to point wireless would be tricky. While there is an AT&T site at a peak near here, they have zero interest in dealing with small customers.
I do have enough land to put up a tower, and I live in the land of data centers. There's a major fiber trunk that runs across the street from me, but nobody is offering fiber hookups (due to an old political agreement that basically gives the existing providers monopoly status)
If you can find a data center willing to let you rent a space in their roof and a small chunk of bandwidth, you could set up an internet cooperative with your neighbors
Just use Ubiquiti UISP equipment https://uisp.com/uisp-overview
Heh, I've dealt with Ubiquiti before, I'm not eager to do so again
The problem is the data centers are east of the ridge, and we're west of the ridge.
Most of the ubiquiti gear can be flashed with OpenWRT if that helps in any way
It would probably be easier to just move to Vermont where I can get 10Gbps FTTH
There is a local coöperative in the process of starting up (I'm supporting them), but their first deployments won't be until next year at the earliest, and I'm probably not in their initial service area.
I have personally never had issues with Ubiquiti, when’s the last time you used them?
They are significantly better than they were
About a year and a half ago, when I was extending wireless coverage to the yard to run security cameras. Or at least, I was trying to do so.
I’ve done that
Fairly straightforward with their nano beams
And I was doing that in 2017/2018
I was using a NanoStation locoM2 and it really wanted to use its own nonstandard protocol.
Sorry nanostation
Nano station just uses a beefier 802.11ac protocol, as do most point to point setups consumer accessible
Admittedly, it might have been easier if I was using Ubiquiti at both ends, so they could agree on their own proprietary modulation, but I had standard WiFi clients that were ... unhappy with the signal provided.
That’s not necessarily a feature of Ubiquiti but unnecessary regulations by the FCC from ye olde times of television
My next security camera deployment will probably be a wired one.
The FCC unfortunately takes a layered approach to regulation, not really getting rid of old stuff and layering on new stuff
If they'd only get off their duffs and regulate phone scammers. They stood up the Robocall Mitigation Database, and now require phone companies to not connect calls from networks that aren't on the database. But they're not updating the database...
Here’s one point to point Ubiquiti install
Did PoE pass through
To do the PoE pass through I had to have a Loco M5 on the camera side, and then just used an M2 on the building side
Yeah, the speed of bureaucracy
Good morning, I'm building a retropie handhelds and was wondering what components to buy? I already have a pi 4 and pi pico for controls
Did you see this guide? https://learn.adafruit.com/retro-gaming-with-raspberry-pi
I did not. I will look at it
there are some other Retro Pi - related guides too; worth searching
Are those guides also on the site?
yes, use the search box on https://learn.adafruit.com
there are several thousand guides on our site (not all retro pi 🙂 )
Thanks very much!
on a side note, I really with retropie wasn't so awful from a UI perspective
literally every single function you need to access is on a CLI ascii program...
for all the effort that's gone into making an admitedly quite pretty front-end, I can't help but think a tiny bit more would have allowed that frontend to actualy be used to access all the functions it simply points to.
I know, open source, if you want beter do it yourself and contribute etc (and if I was any ghood at the frameworks that retropie uses I proabbyl would)
still too pricey for my likes
twice the price of the 2GB for extra RAM
it bodes well for future supplies tho...maybe we'll finally see a 4A
I like the smirk and the in-built provocation of "Im a cat catch me if you can"
😼 
this was complicated but what do you guys think?
first proper Arduino sdk project
headphone warning: music is playing
the arrow indicates a sub menu, no arrow means it's an application of some sort
Hey guys, I need to redesign a howland current pump, any advice? 🙂
I need it to tolerate +-30V and output +-3mA at aby DAC 🙂
What's your power supply voltage?
You aren't going to get ±30V from a ±24V supply
I'm curious why a boost converter would not work here. I obviously do not know what I am saying, and would like to learn, not to suggest anything 😅
While it's possible to use a boost converter, that becomes the "power supply" at that point, as far as I'm concerned.
I'm guessing you'd need some sort of bipolar boost converter as well, in which case it may be easier to just have a single supply powering a boost converter producing the positive and negative voltages, instead of two separate boost converters, one for positive and one for negative. But I'm less sure about that.
Sounds amazing but back to the Basics under the situation that i have +-24V and want to convert it to +-3mA
I think you are not understanding that voltage and current are related and conversely dependent on one another
In the context of circuits that is
Current = Voltage / Resistance for linear circuits.
But trying to go from a voltage source to a current source would not be smart.
It’s better to provide a set voltage like 24V and regular down to the lower voltages you need and let the circuit draw up to the current it needs.
Constant current sources generally are good for things like LEDs
Rechargeable batteries also require constant current sources
Unless a part specifies needing a constant current source, don’t use it
I highly suggest looking at learning an introductory circuit analysis course, something like Khan Academy. It’s going to provide some important fundamentals that are important for circuit design. And it will give you some tools like ohms law, kirchoffs laws on voltage and current.
Is there a 5v power distributor pcb out there I can use for a portable pi?
Is it a pi W?
If so, you might consider this: https://www.adafruit.com/product/5705
Pi 4
It is strangely fitting how, just like some retro computers, so many pi addons include an RTC
That looks perfect!!
I've said this before and I'll say it again: RPF really needs to rethink their power design. 5V over USB isn't enough over cable lengths beyond ~1m.
i think the best option, is to start using the PD protocol, and add a buck converter to the pi
12v over usb-c, problem solved
but that adds to the board cost
oh, right, and more direct conversion...
the DS9121 is being used in some models to generate the cpu core voltage...
dang, 5.5v max input
the MX7704 is also used on other rails...
Over USB C it’s better than micro b
5.5v again
But still not great
so you cant just 12v->3.3v
They are drawing more power than is reasonable at 5V without sense lines to make sure there's actually 5V reaching the board.
yeah, i keep saying, more things need sense lines
but everybody is being an idiot, and just sets the psu to 5.1 or 5.4v
5.1 or 5.2V is fine. I'm pretty sure 5.4 is out of spec for USB.
They need to either dump USB power and use sense lines, or use USB-PD and negotiate something >5V.
the problem is when people just keep cranking the voltage, until the pi gets 5v
but when idle, it gets too much
just use sense lines!!
it should even be simple to do sense with usb power bricks!
get your standard 4 core usb wire (power+data)
wire the data pair to the power pins!!
USB actually is spec’d to deliver up to 5.5V
reuse data as sense 😛
Not without repurposing pins.
At this point, you aren't doing USB anymore
if its a power brick, it had no use for data
Yeeeeah, and when the user accidentally connects their phone in
so you just wire both power and data, to the + and gnd at the usb-c/micro-b port
and boom, your now getting 5v at the connector
Up to. That doesn't mean it can (or should) always deliver it. That's the maximum acceptable voltage.
And the phone tries to negotiate with the "data lines"
In USB-C it's the CC lines.
It’s spec’d for that because of expected voltage drops over typical distances
at the usb connector, solder both power and "data" wires from a standard usb cable, to the power pins
350mV drop over 5m for a typical cable
add whatever normal resistors you use, on the real data pins
Those will still get the supply voltage across them, and be tied to whatever additional biasing circuitry is there for communication.
if its a power brick, there is no actual data going on
just the resistors for normal charge signalling
Yes, but what happens when you connect a device expecting data on the data pins?
nothing, same as when you connect a normal charger
because the "data wires" are not on the data pins
Also, having additional components like that defeats the purpose of a sense network.
i think youve missed what i said to do
... so now you'd need a specialized, out-of-spec USB cable.
Texas Instruments has a application note that states 5V +/-5% for USB
no, a brick with a permanently attached cable
That takes away a lot of versatility, plus it doesn't work for anything beside that specific brick.
The last thing anyone needs is out of spec USB hardware.
basically, use 4-core usb wire in this cable
but reuse the data pair, as a sense pair
now you always get perfect 5v at the connector
the device at the connector will notice no changes
the voltage will just be better
I understand what you are saying, and I disagree. If you are going to set up a connector with sense wires, it should not be USB.
yeah, the limit with my trick, is that its only sensing at the back of that first connector
so if you add extensions, it wont help
*more out of spec USB hardware ;)
and then you need a new spec, for extending the sense wires
Or... just run at a higher voltage and regulate onboard like everyone else. Don't get me wrong, I absolutely love having sense lines, but it isn't necessary here.
yeah, thats just using PD to ask for 12v, and buck-regulating down
and assumes you can boot enough to speak PD, while on just 5v
or just go old-school
barrel jack and 12v, lol
I prefer mind powered
I built a USB PDU a few years, for my solar setup.
I have to supply that with 5.25v, because of the power drop.
linear or switching? per port or shared?
Shared, not sure about the first part. 😛
I'm using a DC/DC converter, to step-down from 12v.
12->5.25, and then exposing 5.25 over usb?
The output on the ports is only 5v
The input needs to be higher to compensate for the drop.
ah, then there must be another regulator inside that
There is a capacitor on the PDU.. I think that's causing the drop.
There are chips that do exactly this. No need to power on the entire processor.
yeah, thats a shortcut
There's a diode after the USB port I believe.
Regardless it's a poor design.
i've just realised that all the work i've done isn't actually going to work
i dont think
can someone just confirm or deny
here is the menu
it mainly relies on pointers
and i want the applications to display as menus
so say i open up an SSID Scanner application
is shows each SSID it finds as a menu item
then i can open that menu that it generates
to get a list of actions i can do to that SSID
but when i do this ```cpp
#pragma once
#include "../../Application.h"
#include "../../../Menu/Menu.h"
namespace Wifi::SSID_Scanner {
constexpr auto Type{EApplicationTypes::Wifi};
void Run();
inline Menu* SSID_List = new Menu("SSID List", true);
}```
i get a core panic (store access fault)
spoiler: everything is a pointer 😛
yes
anyways im not going to be able to predetermine how many SSIDs it picks up
so i cant just create that many pseudo item pointers to do it
so im always going to get the register and stack dump
right?
or is there something im missing
it doesn't help that this is very uninformative
It's pointers all the way down. Page tables are a thing.
would that make it work
what are they
idk
im lost
maybe you could dynamically generate menu items? Like when scrolling down generate the next page
I think the esp32 has a line by line debugging facility. I'm not sure whether that'd work w/. arduino, but you could use it to troubleshoot what's going on in your code
it does but you need a JTAG debugger
which i lack
well i cant even generate the menu item
How much would that set you back? It sounds like an useful investment if you keep working with that line of micros
so its structured like i have a generic Menu pointer
which is the current menu
so i can handle everything generically
to do with the menu
that works fine
i dont know, i need to find a good one
maybe some callback function 🤔
i've spent hundreds on equipment so far
and i have thousands to spend on it so if i need to buy one i'll get one
i dont really care, money is useless to me atm considering i dont pay rent 
omg you gave me an idea
RP2040 = ❤️ because you can use a second RP2040 as debugger for only 4€
yes exactly
what if i use one of my picos
to debug
would that work?
some like jtag interface binary must exist that translate jtag to the PC on the pico
If it can provide a usb to jtag bridge, it can probably do it ;)
No idea. I've also been kinda curious (but not curious enough to actually look it up) if you can use picoprobe with other MCUs 😆
well it must be able to because picos can debug other picos
i assume its over JTAG
and its interfaced with the pc over usb
picoprobe is SWD :(
hmm
i'll try this first
i dont have the pico sdk installed so i beg that there is a precompiled uf2
omg there is
I just love the photograph, with a $4 pico being used to debug a probably $1k+ Xilinx Zynq FPGA (board)
hah. Looks like this board goes for ~200$
😭
idk
i probably have one somewhere
i just dont know if i do
i brought one
when i got my first pico
that was it
now i have 3 x esp32s
an esp32c3
I mean, it's worth it to look?
a pico w
SWD is one debug protocol and JTAG another? Some MCUs use SWD others JTAG? Or what even is that stuff 😆
I think SWD is an ARM-specific variant of JTAG
Dialect? :P
but the esp32 is ARM
nop
ah 👍 thanks
esp32 is xtensa
XTensa and RiscV(C3 iirc)
Yeah, the new one (will?) be riscv
It's the new trend with chips coming from the Mainland
Howdy folks. I signed up for 2fa a while back but I'm not clear on what the forum wants me to do to login now.
i have like 10 usb c cables
that's not much (i've read that as binary)
i found one
that's still 10
that's a lot (i've read that as roman numerals)
that's a lot (I've read that as factorial)
Hilbert USB port
3628800
There is definitely not. 🙂
alright so i have the jtag thingy
but i dont know where or how to connect things
i plugged everything into the pico
where it should be
ah crap
im using the jtag gpio pins for something
already
ugh
wait
am i
im confused
this diagram is confusing
You need GPIO12, 13, 14, 15
I don't see those GPIOs on the pinout your posted
Does your board have a JTAG header somewhere?
JTAG is not a 1-wire protocol
o_o
yes
lmao 😭
im being serial
Yeah, you can't use those pins while using jtag
i dont need them really anyways atm
i should be able to just
switch the wires elsewhere
Just comment out all the code that uses them or switch them to other pins. Also this:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/index.html
they're all digital read so its not like i have to use them
but then i cant nav the menu
so i cant find runtime errors that occur outside of the main menu
Why not call the function that messes things up directly?
i'll just move them
but using the debugger you can edit the variable values 😆
bahaha
i dont need to
the moment i compile with that one line of code
i get hit by a train of core panic
oh, like live programming?
not sure what exactly is possible with such debuggers
but I think I could just set any variable to any value 🤔
im using platformio, im not too familiar with the debugger
its openocd
but i dont know how to use it
same 😆
Gotta be careful when you do that though because it is very easy to put the entire program into an invalid state if that variable affects the execution path.
then i get this
undefinedC:\Users\user.platformio\packages\toolchain-riscv32-esp\bin\riscv32-esp-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\user\Documents\PlatformIO\Projects\ESP32-C3.pio\build\esp32-c3-devkitm-1\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = cmsis-dap
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 5000 kHz
Info : tcl server disabled
Info : telnet server disabled
wait why tf is it using telnet
that's like the most insecure protocol ever

i cant figure this out
Where does it err for you?
But Spy-Bi-Wire is a 2-wire protocol that appears to be similar.
Ha, reading this, I though the name was some sort of pun, and then I googled it 😅
Off-topic: There is an Arduino Telnet library https://github.com/JAndrassy/TelnetStream
* four
Connect Reset too
to en?
I haven't done this myself, but the ESP32-C3 should be able to do JTAG over USB for chip revisions after 0.3. At least that's what the documentation says. If the CPU revision is older than 0.3 you have to use a JTAG adapter with the GPIO pins. JTAG over USB doesn't need any additional hardware connection.
I've never done this, but a natural guess would be RST->RST ;)
omfg it works
Congrats!
there isn't a reset pin on the esp32-c3
the rst button goes to EN
There is, it's called EN
yeah sorry I hit return between your messages
That's a strange name for a reset pin. Sorry, as I said, not really familiar with this MCU
EN is the opposite thing, it just means "ENable"
There also isn’t technically a “reset” pin on the rp2040. It’s labeled “run” on the pinout
i was confused
But it is functionally reset
Ah, so it's RST_N
I wish we could put the bar over the text here like in a circuit diagram... yeah, when you disable enable it's reset 😉
well it did work
until i connected rst
undefinedC:\Users\user\.platformio\packages\toolchain-riscv32-esp\bin\riscv32-esp-elf-gdb.exe: warning: Couldn't determine a path for the index cache directory.
Reading symbols from c:\Users\user\Documents\PlatformIO\Projects\ESP32-C3\.pio\build\esp32-c3-devkitm-1\firmware.elf...
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = cmsis-dap
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 5000 kHz
Info : tcl server disabled
error
You can probably do it with cursed unicode stuff nowadays ;)
Well, then, don't connect reset ;)
now its broken again
I guess you could restart it?
̅N̅ or ̅Ndoesn't look quite right 😦
Or you can try JTAG over USB and not worry about the pi or any GPIO connections
close though!
a̅
my pc fans are blazing rn
ū
"Target disconnected.: Success" is peak computer message
and now its broke again
I guess windows, the raspberry pico "JTAG Adapter" or the platformio debugging stack, or some combination of the three are unreliable
possibly
I don't think you'd need drivers for that?
I wouldn't know. I do all my embedded stuff on Linux
🐧
fair
And if you did need drivers it would never have worked even before you connected reset
oh yeah good point
or windows installed the correct driver at the first connect. At the second connect it noticed its mistake and quickly fixed everything by installing the wrong drivers 😭 Happens to me all the time
yeah, that can help, especially with kludgy stuff like this
... but "target disconnected" means that the driver is correct. It can communicate with the debug-probe but the debug-probe can't communicate with the device. At least that's how it is for me and picoprobe
good point
same error though
done loads
it does that on compile
but its worth a shot
with the reset button
or like
bootsel
i did both
......restart your computer? Running out of ideas tbh :P
maybe
i'll restart vs code
first
also someone needs to make a ghidra x vs code extention
Since you already have the code, I cannot imagine why you'd need ghidra
well i like ghidra
its useful
it helps me figure out how other things work
i dont mean for my stuff
but i hate loading it
its ugly asf
i'd prefer to be able to open an exe with vs code
and see the asm or c code
like that
idk
maybe im weird
language :)
ugly as frick

alright im gunna watch dave garage's video cause i know he uses platformio and he has a video on jtag debugging
it was the driver
i have to install winusb
to enable ftdi
jtag debugging
o.o
i already have them installed from a previous project
so it must have picked them up
then gone ah no this isn't a usb device
have no driver instead
windows is strange
i agree
if i could i'd use linux
but i teach unreal engine, which does not play well with linux
at all
I keep windows around for the edge cases
Linux is for pleasure and Mac is for everything else
makes sense :)
linux is nice. Shame the GUI is a mess
That—that just hurts my brain. Why would they do that?
Because when it’s not pulled low, it knows to run the code lol
That's still just an active low reset, unless pulling it low still preserves the system state.
Nope lol
then... it's just an active low reset...........
No, it's active high run.
i have spent so long trying to make the pico work with jtag debugging again
and it still isn't working
it worked the first time
Where's the best place to submit product feedback and suggestions?
maybe it would work better if you use SWD debugging?
i had it working to use a pico to debug an esp32
but now i cant
and i dont think the esp32 has SWD
nope
a second pico?
i have 2 picos
you can configure one pico as a logic analyzer
and then snoop on the jtag traffic, to debug that
but only one has pins
there is no jtag traffic
its openocd
that's being weird
ah
it just doesn't connect
i was using dirtyjtag
and it worked
once
then i was told to connect a reset pin
i did that
ive always used the sysfs_gpio or rpi_gpio driver in openocd
and it hasn't worked ever since
and just bit-banged the jtag directly from the pi
does the pico show up as a storage device, when you hold the bootsel button?
yes
then its not cooked
then i drag dirty jtag onto it
and it does its business
but what confuses me
is that windows doesn't give it a driver
i tried using zadig
open up device manager, and look at what device shows up, when you plug it in
to install something
it doesn't have a driver
right click, properties, tags i think it was? last tab
details
hardware id's i think?
that tells you which driver is needed
yep there, 1209:c0ca
am i supposed to install the InterBiometrics driver or something
no
depending on build options, it will either show up as a single vendor device
or a vendor+serial port
it shows up as one device without a driver
im installing libusbK
i'll see if that works
https://review.openocd.org/c/openocd/+/7344/23/src/jtag/drivers/dirtyjtag.c
reading the source here, i can see it doesnt use a driver
openocd uses libusb to just talk directly to it
so, you need a copy of openocd, that was build with libusb and dirty-jtag support
and where would i find one of those
by building the source from https://openocd.org/
You don't need to use the pico to do jtag with the C3
You can run it directly over USB without any extra hardware. The ESP32-C3 supports JTAG over USB.
You don't have to use a pico or any other hardware.
i have to chop up a usb cable
The only requirement is that the C3 revision is greater than 0.3
how do i know
the bootloader messages that the C3 outputs when it boots will show the revision number. You watch them in a terminal window set to 115200bps
ah
you can't use the same USB cable as you're using with the pico?
that isn't chopped up
why do you think you need to chop up a USB cable?
because it said that i need to plug usb D- into pin 18
and D+ to pin 19
i once decapitated a usb cable, just by dropping a 12v battery on it
nice clean cut, looked like it was done with scissors, lol
The USB port on your ESP32-C3 is almost certainly already wired that way
i'm lucky that wasnt my foot
you shouldn't need to do anything but plug the USB cable into it
then why the fffffffffffffffffffffffffff did it tell me to that
now i am confused
what said you need to do that?
i've been trying to debug this little mf for about 5 hours now
its 4:30 am almost
lmao
i swear why is the openocd website so mf confusing
where the is the source code
to build
because they decided to use sourceforge
Sourceforge predates github. OpenOCD has been around for a long time. GDB even longer.
then why it still on version 0.10.0
or whatever it said
tbf i wasn't paying attention that might be some other thing that said that it would let me debug my controller
i downloaded expressif's
and apparenly there is an error
in their cfg files
C:/Users/user/Downloads/openocd-esp32-win32-0.12.0-esp32-20230419/openocd-esp32/bin/../share/openocd/scripts/target/esp_common.cfg:4: Error:
at file "C:/Users/user/Downloads/openocd-esp32-win32-0.12.0-esp32-20230419/openocd-esp32/bin/../share/openocd/scripts/target/esp_common.cfg", line 4
and what is the contents of that file?
how did you run openocd? is the include path set to include the scripts dir?
from the DIR
the rest are env vars i think
what CLI args did you launch it with?
openocd -s /home/pi/openocd/tcl/ -f rpi4-to-rpi1.tcl
ive ran it something like this before, so you need a -s pointing to that scripts dir
exactly what it told me to
openocd -f board/esp32c3-builtin.cfg
i just deleted the catch line
that worked
other people did that too apparently
now i just got Error: esp_usb_jtag: could not find or open device!
probably because its in use atm by the serial monitor
nope
Open On-Chip Debugger v0.12.0-esp32-20230419 (2023-04-18-22:02)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselecting 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: esp_usb_jtag: could not find or open device!
its because you have to cut up a USB cable
i knew it
where does it say you need to do that?
you need to use pins 18 and 19 for D+ and D-
also it wont connect normally
and which website was that on?
it says it in the expressif docs
somewhere
nevermind
im so lost
i followed every step
exactly
and it isn't working
Hey guys 👋
so this is a power meter + logger I made using Pi Pico + INA219 current sensor + SSD1306 display +SD card holder
On display, it shows Voltage, Current and Power in first three rows
On bottom row, the first section shows time since power up, the second section shows if SD card is present or not (if SD card is present , it just shows SD as shown, if SD card is not present, it shows SD), the third section shows the battery voltage, so you get a rough idea of when to charge this thing
the time since power up/reset is the time for which data is being logged to SD card. I used Pico's on board RTC for this purpose and is accurate for upto 30 days (Which is totally not necessary 😂 )
the current sensor can measure upto 26V and plus minus 3.2A
The voltage, current and power get logged to SD card along with the timestamp
I am gonna mount everything on a prototype board. Do you guys have any suggestions as to which some feature i can add or smth ??
If you guys want , ill share my code and wiring (its really simple so idk if someone actually wants that 🤷♂️ )
Let me know if you have any improvement suggestions 😄
Hello, I have a question, I am currently using Adafruit HDMI 5" Display Backpacks - Without Touch [ID:2232] and am looking for a compatible video player. Does anyone know of one? I currently have a Sprite player, but it is not compatible and does not output video to the display.
iirc OMXPlayer is the default on the Raspberry Pi
Thank for your kindness. I'll try it.
how can i mount RFM9X LoRa? it doesnt seem to have screw holes
@limpid sedge which one? the stand alone module or breakout?
the feathers have mounting holes so i'll assume you mean the breakout.
generally, the breakout is designed for breadboard use. for permanent mounting use a 3d printed enclosure or some other type of hand made enclosure.
There are board edge clips available
if you use the sidelaunch sma then you can drill a hole through an enclosure and the antenna becomes the mounting point
if you use the ufl connector to sma then throw it in a little plastic box, drill a hole, and attach the antenna.
the breakout is really designed to a breadboard prototype for designing your own pcb, when you have the prototype working then you order just the module and add it to your PCB
if that's not your goal then it's best to get the RFM95 Feather instead.
breakout
part number 3072/3073
Yup, then my advice was on point.
one keycap at a time, sounds like a plan.
im trying to make a prototype PCB though, so i dont really have an enclosure...
You can design your PCB with through holes, you can use the breakout to drop into a PCB as well, just need to ensure the through holes are correctly spaced.
ah, and then can make a hole into the breakout and connect it?
yup
would be the same as stacking feathers. as long as the through hole spacing is the same you can stack them. so you'd stack the module right onto your pcb.
good to know, and also if i want to make a final stage pcb, and end up using just the module, I need other supporting componenets right, like whatever else is on the breakout also goes on my pcb?
yes and can add whatever other peripherals you might want, that's the benefit of designing your own pcb, make it however you want.
i mean can i just t ake the module a nd put that on the PCb and be the end of it?
or do i need resistors and capicitors and other stuff
the benefit of the feather is that it's got a lot of great features already on it including lipo battery charging, ldo, lots of GPIO, stemma, etc..
if using the module itself you would want to replicate what the breakout schematic has at the very least for powering it safely.
referencing what the rfm95 feather schematic does would be a good idea too
because the rfm95 feather uses the module not the breakout 😉
ok
good to know thanks!
im making prototype rn so using breakouts,
ideally wanna make final one smaller cause breakouts waste space
for more help with hw design i recommend asking in the #help-with-hw-design they specialize in hw design in there. 😉
I decided to revisit my SAMD51P19A board because i couldn't get it to show up before.. fresh board and now it's programmed with a USB UF2 bootloader.
feels good. nearly a year later
does adafruit sell antennas to use with LORA 915Mhz radio and the side mount SMA kit?
915 MHz LoRa compatible antenna basiclly does adafruit sell this?
does this work
nice! Problem is, I can't find anything in google or mouser for "SAMD52P19A".. Perhaps a typo in the part name?
yes
Alright, got a datasheet. Thanks! :)
finger hit the 2 instead of a 1
unfortunately the chip is out till at least april next year
because it's the TFBGA package
oof, you managed to solder that?
it still has atmel branding. Interesting
yeah
what is a uFL antenna that works with LORA 915mhz?
so is the keeboor basically a pico but in the pro micro footprint?
Serial\.(print|println)\((.*?)\);``` this regex has saved my sanity when deleting my Serial.print statements
hopefully it will be useful to everyone else aswell
if you're using vscode anyways you can find and replace with regex
replace all and boom
Would you like to learn about our lord and savior, vim? :P
i very much would like to pass on that
i'll stick to vscode
lmao
i tried vim
i couldn't get out of it
now i know how to
but still
i was stuck in vim for like an hour
lmfao
(you can also use vscode with vim key bindings)
It's really powerful if you get the hand of it
fair
im still stuck
with that one thing
i cannot figure it out
for the life of me
Have you tried taking a break? ☕
i did
but thank you
you inadvertantly gave me an idea
i have a Menu pointer which is defined in the menu class
instead of creating a new menu
what if i just
take the current menu
wait actually
im gunna need your expertise here
to tell me if this will break or not
Menu* CurrentMenu;
i have that
then say i want to create a new menu
my menu takes a pointer to a menu
so if i did this
CurrentMenu = new Menu("menuName" (bool)DisplayHeader, CurrentMenu);```
would that break
or would it pass the pointer to what current menu is currently pointing to
Yes, the Keyboar is exactly that, an rp2040 in the pro micro form factor
is it possible to brick the bootloader on an esp32
first off actually, is it possible to modify the bootloader
The first stage bootloader on an ESP32 is in ROM. It is not possible to brick it or, in general, an ESP32. It loads the second stage bootloader from flash. It's easy to damage the second stage bootloader, but if you do you can just re-flash it. What the second stage bootloader does and how you do that completely depends on the system you're working with (in CircuitPython it's a UF2 loader that makes the ESP32 appear as a flash drive to the host computer; in Arduino and ESP-IDF it's a stub that loads a bigger application from flash).
You can damage an ESP32 in a variety of mechanical and electrical ways, but not through software. You can permanently program an ESP32 to only run applications that are cryptographically signed, but you're probably more likely to spontaneously change into a cat than do that accidentally.
Does their secure boot process use trusted intermediates like UEFI secure boot, or do you enroll your own key in?
(I mean, you can also do that with UEFI, but it's kinda more involved, and I think it isn't possible in some systems?)
You burn an RSA-3072 public key into the ESP32 using efuses. The ESP32 verifies the second stage bootloader using the key. You generate the key yourself (pretty sure Espressif provides a utility to do this for you)
The bootloader verifies the application using the key, so you're trusting the bootloader but given that you had to sign it for it to load and it's really just part of your application that should be fine.
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/security/secure-boot-v2.html
I've only encountered one device in the wild that was using this - Amazon's "Smart Air Quality Monitor"... unfortunately it by default disables JTAG. Folks at my hackerspace were hoping to run their own code on it, but no such luck. I'm sure others do use it but I can't see hobbyists going anywhere near it.
(to be honest I've never calculated the odds of spontaneously turning into a cat... 😉 )
RSA-3072
That's a lot of efuses!
yeah!
Thanks for the info. I can't see me using it any time soon, but it's nice to know
(I don't even own any esp32 :P)
bcm2711/rpi4 secure-boot is a bit dumber
you can create your own rsa2048 key, but that public is stored in external SPI flash
the sha256 (512 bits) of that public key is burned into fuses
the 2nd-stage loader, is then signed by a different rsa2048 key (RPF's key)
I have a whole bucket of various ESP32s, most of my embedded controller work is with them mostly because they're so cheap and easy to get and have built-in wifi
so, the rom validates the 2nd-stage with a 3rd-party key
that 2nd stage then verifies the user key via a hash in fuses
the 2nd stage then verifies the next stage with the user key
that's a lot fewer fuses though 🙂
yeah
from what ive seen, the biggest feature of the esp32 lineup, is the MMU before the XIP
so you can store 2 conflicting binaries in flash, and the MMU maps them to whatever addr they are compiled for
allowing you to do an A/B boot setup
Since it has an MMU, you could technically run some sort of UNIX on it.....
it's not much of an MMU
pretty sure someone did get a really stripped down kernel running on one though
There is an xtensa port, isn't there?
Minix realness 😉
the big negative i see, with how rpi did it
the 4 real boot keys (in the boot rom), are shared between every single bcm2711, they will never share those keys
uhhhh someone wrote a RISC V emulator for the ESP32 and booted RISC V linux in it 🤣
so, if you want secure-boot, you must use the closed-source 2nd-stage binary
but by default, the rsa validation is disabled
and only hmac-sha1 validation is used
I mean, if you seek secure boot, using the closed-source binary probably is not your concern :P
its trivial to dump the hmac keys, and then sign your own binaries
This is so cursed 😅
Now they can try doing it natively on the new esp32! :P
for the current rpi4 firmware, the 2nd row (all of the .bin files) is verified with hmac-sha1 by default, but those keys are easily dumped
The ESP32-P4 should be their highest end ESP32... dual core 400MHz RISC V, 768K of SRAM, "enhanced MMU"... maybe it'll run Linux natively and well. I'm just not sure what decade it will be released.
there is a fuse to flip on rsa2048 validation, and 4 fuses to independently revoke the 4 rsa2048 public's in the rom
the 0th key was used to sign blobs that lack secure-boot, so the official directions say to revoke that key
when an official bootcode.bin detects that rsa validation is enabled, it will then enforce the rest of the security chain
validating the user rsa2048 hash against fuses, and that you have a signed boot.img + boot.sig on your fat partition
and all future files, are loaded from boot.img (fat32, in a file, on fat32, lol)
Heh, designing silicon is hard, and so far they were using licensed tensilica IP
but internal files (from SPI flash), like bootmain.elf, have the expected hash baked into the bootcode.bin binary
if you modify them, the hash is invalid
and if you fix the hash, the signature becomes invalid
so, in other words, the rpi has to have some closed blobs in it for it to function
yep
ive been working on replacing those blobs
and i can boot linux on the pi2/pi3 without any blobs present
Well, how are you going to bypass secure boot?
on the pi0-pi3 range, validation isnt enabled by default
so unsigned binaries just work
on the pi4/pi400, only hmac-sha1 validation is enabled by default
its a symetric algo, the signing key is the validation key
just dump the bootrom, decompile, and theres your key
the entire family, pi0-pi400, all use the same hmac-sha1 algo
a 20 byte constant in the bootrom (unique to each model) gets xor'd with a 16 byte per-device key in fuses
however, RPF decided to use the same "per-device" key on every device in a model
so all that security has just gone out the window 😛
that serious lack of security, makes me think they wanted a checksum, not a signature
but they didnt want to re-spin the bootrom
thats why i havent posted the keys anywhere
if you want some keys, compile and run https://github.com/librerpi/lk-overlay/blob/master/app/signing-dump/signing-dump.c on your own pi4
but that only works on certain revisions of the boot rom
Espressif uses some closed source blobs on the ESP32 line - the wifi and Bluetooth drivers are closed source, the first stage bootloader is too. Maybe some other stuff. But they also don't make a big deal about being open source (though they do a decent job with their development system)



