Go to advanced search

by pica200
Wed Sep 08, 2021 10:06 am
Forum: General
Topic: Low-latency pattern matching peripheral data
Replies: 12
Views: 756

Re: Low-latency pattern matching peripheral data

You should be able to do some pattern matching in PIO (it can do I2C/SPI/UART no problem) and from there you can also triggers the glitch. Glitching requires extremely precise timing. I would argue that anything outside PIO is simply too unreliable/high latency. You either want PIO or a FPGA. And we...
by pica200
Sun Aug 08, 2021 4:14 pm
Forum: SDK
Topic: Debugging Alignment Exceptions
Replies: 85
Views: 3783

Re: Debugging Alignment Exceptions

I'm against thhe idea of having a hidden unaligned access handler by default because it hides hardware limitations and may leave people scratching their head wondering why their code runs so slow. It's better to have the programmer understand that unaligned access is not supported by the hardware an...
by pica200
Sat Aug 07, 2021 11:26 am
Forum: SDK
Topic: Debugging Alignment Exceptions
Replies: 85
Views: 3783

Re: Debugging Alignment Exceptions

You can also take the address of the faulting instruction and run arm-none-eabi-addr2line with the elf file which gives you the exact source file with the line where the fault occurs.
by pica200
Sun Aug 01, 2021 1:31 pm
Forum: General
Topic: [SOLVED] RP2 Boot Serial Number
Replies: 7
Views: 520

Re: RP2 Boot Serial Number

trejan wrote:
Sat Jul 31, 2021 11:10 pm
It is the git hash of the chip HDL source and the git revision of the bootrom. Both are private repos so don't mean much to the general public.
Are you sure about that?
by pica200
Sat Jul 24, 2021 7:45 pm
Forum: SDK
Topic: Setting PICO_SDK_PATH in your CMakeLists.txt (hint: dont)
Replies: 69
Views: 3274

Re: Setting PICO_SDK_PATH in your CMakeLists.txt (hint: dont)

I guess i'm guilty. But i manually specify the path in pico_sdk_import.cmake. For me it's lazyness and i keep this bodge in mind. If i make my code public i will remove the bodge but unfortunately not everyone does. I second the idea of defining a standard location like "/opt/raspberrypi/pico-s...
by pica200
Sat Jul 24, 2021 7:28 pm
Forum: General
Topic: Determining warnings to tolerate
Replies: 9
Views: 490

Re: Determining warnings to tolerate

My take on warnings is if you can fix them then do so. There are many warnings that look harmless but they are real bugs. If you don't take care of them they will bite you later.

If you use any lib and the warnings are in that lib i would report them.
by pica200
Sat Jun 19, 2021 8:26 pm
Forum: General
Topic: [SOLVED] Dynamic code execution
Replies: 44
Views: 2417

Re: Dynamic code execution

[ 16%] Building C object CMakeFiles/myasm.dir/myasm.c.obj /tmp/ccgQGdx1.s: Assembler messages: /tmp/ccgQGdx1.s:73: Warning: this instruction will write back the base register /tmp/ccgQGdx1.s:150: Warning: this instruction will write back the base register [ 17%] Linking CXX executable myasm.elf [10...
by pica200
Wed May 26, 2021 6:47 pm
Forum: SDK
Topic: Recommended replacement for "volatile"?
Replies: 7
Views: 665

Re: Recommended replacement for "volatile"?

For ISRs modifying global vars maybe atomics would be a better choice. See stdatomic.h/atomic.
by pica200
Fri May 21, 2021 11:59 am
Forum: SDK
Topic: Need a 24 bit memset
Replies: 23
Views: 1227

Re: Need a 24 bit memset

It is perhaps worth remarking that Intel processors are tolerant of misaligned memory access, and will do them in multiple steps, whereas ARM processors are not, and raise a trap if one is attempted. That's not true. It has been supported since at least ARMv6 so over a decade. The Cortex-M0+ i have...
by pica200
Mon May 10, 2021 5:42 pm
Forum: General
Topic: I2C repeat start support?
Replies: 3
Views: 257

Re: I2C repeat start support?

What do they mean with its non-standard? As far as i know repeated start is perfectly fine and standard behavior for devices with registers when you change the direction.
by pica200
Sun May 09, 2021 12:57 pm
Forum: General
Topic: Second pico dead(ish)
Replies: 19
Views: 1913

Re: Second pico dead(ish)

Try unplugging all USB devices and then only plug the Pico in. Does it show up as drive? There is a known bug mentioned in the datasheet where other devices on the same hub can make USB on the Pico/RP2040 fail.
by pica200
Sat Apr 24, 2021 11:26 am
Forum: SDK
Topic: Why is chip select set manually in the SPI examples?
Replies: 7
Views: 854

Re: Why is chip select set manually in the SPI examples?

Is all of this actually documented behavior? Otherwise i would make a bug report.
by pica200
Wed Apr 21, 2021 8:36 am
Forum: General
Topic: anyone know about SD cards?
Replies: 6
Views: 548

Re: anyone know about SD cards?

If nothing is mentioned for SPI mode i would assume it's the same as SD mode. And yeah, a timer is better than loop counts. I don't know Python so i assumed the timeout you mentioned was about read and write but yeah, the op cond loop needs a timeout of 1 second. I have a very old 2 GB SD that takes...
by pica200
Tue Apr 20, 2021 10:29 am
Forum: General
Topic: anyone know about SD cards?
Replies: 6
Views: 548

Re: anyone know about SD cards?

I don't think this has anything to do with missing pull ups. None of that is required to my knowledge. It's simply the card takes longer than expected to respond. If i remember right the max timeout for read/write was about 500 ms.
by pica200
Tue Apr 20, 2021 12:58 am
Forum: General
Topic: anyone know about SD cards?
Replies: 6
Views: 548

Re: anyone know about SD cards?

The timeouts for reads and writes are specified in "Physical Layer Simplified Specification" here:
https://www.sdcard.org/downloads/pls/

Don't know the pages out of my head but it does give you the maximum times for read/write.
by pica200
Sun Apr 04, 2021 5:50 pm
Forum: General
Topic: NES Emulator running on the Pico
Replies: 2
Views: 508

Re: NES Emulator running on the Pico

This is pretty impressive for a microcontroller. Both the VGA output and the full speed emulation. Good job :)
by pica200
Sat Mar 27, 2021 1:21 am
Forum: General
Topic: Ethernet PHY project
Replies: 10
Views: 657

Re: Ethernet PHY project

For what it's worth you can do "git clone --recursive ..." which will automatically clone all submodules too.
by pica200
Sat Mar 20, 2021 3:39 pm
Forum: General
Topic: Is Pico capable of true buffered input capture timer / pulse timestamp ability?
Replies: 13
Views: 1332

Re: Is Pico capable of true buffered input capture timer / pulse timestamp ability?

The only problem is getting the very first timestamp (if you want to know when capture got triggered). From there on you can add the time between each sample made by PIO since it is guaranteed constant time. No need for cursed hacks. Another problem is if you are sampling at system frequency you mus...
by pica200
Wed Mar 17, 2021 10:01 pm
Forum: General
Topic: PIO CANbus / ODBII ?
Replies: 20
Views: 3517

Re: PIO CANbus / ODBII ?

I have taken a quick look at the CAN protocoll and that's a lot more complex than your usual protocoll. But i still do think this can be implemented in PIO. Might not be cheap on instruction mem.You will need one pin that does the data transmit/receive (+ extra components for level shifting and diff...
by pica200
Wed Mar 17, 2021 9:29 pm
Forum: General
Topic: Understanding PIO: Multiple wrap_targets per PIO instance and other questions
Replies: 6
Views: 700

Re: Understanding PIO: Multiple wrap_targets per PIO instance and other questions

I see no problem with stopping a state machine and loading new code. You must reset execution to the first instruction of the newly loaded code of course. Fortunately no cache or anything to worry about.
by pica200
Wed Mar 17, 2021 2:29 pm
Forum: General
Topic: PIO CANbus / ODBII ?
Replies: 20
Views: 3517

Re: PIO CANbus / ODBII ?

I'm pretty sure it can do CAN but only the bare receive and transmit. I don't really know CAN at all but PIO seems to be able to do just about everything that isn't very complex or requires more than 30 pins. CAN can't be that complicated, CAN it? :mrgreen:
by pica200
Wed Mar 17, 2021 2:20 pm
Forum: General
Topic: Understanding PIO: Multiple wrap_targets per PIO instance and other questions
Replies: 6
Views: 700

Re: Understanding PIO: Multiple wrap_targets per PIO instance and other questions

Yeah, it's 32 instructions per PIO so shared between 4 state machines. Having more would have been nice but i can see why it's limited. The instruction encoding just doesn't allow addressing more. Can't speak for MicroPython but in the C SDK you can start and stop state machines individually at any ...
by pica200
Wed Mar 17, 2021 9:02 am
Forum: SDK
Topic: Context switching breaks SPI/DMA
Replies: 49
Views: 3693

Re: Context switching breaks SPI/DMA

linux and many other kernels, just bans floating point in irq handlers, so the kernel doesnt have to bother with the whole save/restore for floats during an irq but doing similar with division is harder, and any function you call could have hidden division... They may ban it within the kernel but t...
by pica200
Tue Mar 16, 2021 10:14 pm
Forum: General
Topic: PIO design, can I use it elsewhere?
Replies: 10
Views: 681

Re: PIO design, can I use it elsewhere?

ive ask a similar question elsewhere, and it was more that they have nothing to gain if you arent selling it they may not like it, but they would loose money trying to take you to court they would instead wait for you to sell the product, then sue you for everything you now have! but in the case of...
by pica200
Tue Mar 16, 2021 7:40 pm
Forum: General
Topic: PIO design, can I use it elsewhere?
Replies: 10
Views: 681

Re: PIO design, can I use it elsewhere?

This is probably pretty grey area. If you limit it to private use you should be fine. As soon as money is involved you can get into trouble.

Disclaimer:
I'm not a lawyer and you are unlikely to get a definitive answer on this forum. Better play it safe.

Go to advanced search