Shop Learn
New kid on the block: Raspberry Pico - Page 2 — Parallax Forums

New kid on the block: Raspberry Pico

2»

Comments

  • @Cluso99 said:
    So, when you look at ARM for microcontrollers you see they are positioned (forget the ARM roots as that has been lost long ago) for HLL where the programmer is so far removed from the hardware with C that the swapping in and out of registers (by pushing and popping multiple registers) that the understanding of this overhead has been hidden.

    Ye, RP2040 is barely even "ARM" in the original sense. Original ARM architecture has A+(B<<n) -> C kinda ops with conditional exec. RP2040 is Thumb mode only, so while the ops do indeed exec in a single cycle, you need lots of 'em.

  • @Cluso99 said:

    @"Christof Eb." said:

    @Cluso99 said:

    Shame it is an ARM. The instruction set and the pin mapping is terrible compared to P2. But the price is right!
    Only 12 registers and I/O has to be done indirectly because the mapping is not in the bottom page, but rather $0D00_0000 :(

    For my personal taste it is the other way round: ARM/Pico is designed to be used together with a compiler. All the docu in the datasheet uses C. Even in µpython you can access all the hardware registers directly, while P2 carries the burden, that the customers have to know and use all these special assembler instructions in inline assembler.
    What I do miss at the instruction set of ARM M0+ is an easy possibility to load a 32bit constant into a register.

    Have you been able to find out, what happens, when both cores of RP2040 are running from flash and both have to fill their cache? At moment I do not dare to trust timing there.

    From my point of view, the RP2040 is representing itself as a microcontroller. From this point of view, C is not the best language for this. Assembler IMHO is a requirement for obtaining the determinism. C just doesn’t cut it here. Now, when you look at the real uses of microcontrollers, there is a benefit of having some parts (deterministic) being undertaken in one core, while another (non-deterministic) executing in another core running a HLL eg C. This is why P1 and P2 are great micros. Now we are starting to see other multi core microcontrollers.

    So, when you look at ARM for microcontrollers you see they are positioned (forget the ARM roots as that has been lost long ago) for HLL where the programmer is so far removed from the hardware with C that the swapping in and out of registers (by pushing and popping multiple registers) that the understanding of this overhead has been hidden.

    So, when you want to do something unusual with the I/O there are just so many instructions being executed behind the scenes just to simply toggle a pin.
    This is because you have to

    • PUSH R1
    • load the pin base address LDA R1,#$0D
    • shift this with SHL R1,#24
    • now perform the output as H/L/invert/etc instruction
    • POP R1

    And I don’t think it will be that long before we see another addition adding more memory and cores, and I/O.

    It’s a shame it’s not RISC V but RPi has too much invested in ARM to switch, at least for some time.

    Well, the raspberry foundation does not have the goal to make the leading edge microcontroller for very time critical applications. Instead they focus on education and hobby usage. They did have in mind to have software available from start. I am not aware that there is µpython for risc V at the moment. (Although in my experience µpython has some severe difficulties with 2 cores.) And they definitely had to be lower price than ESP-32 boards with pico. Otherwise there would have been the option to use M4 or M7 which you can buy from others. Still Pico is certainly very much more powerful than picaxe or original atmel arduino hardware, which have been important in this market.
    At the moment I am astonished finding, that not so much the 8 cores but the slightly better adc and dac possibilities make P2 better suitable for my distortion analyser project than pico. And I am using VGA at least to help debugging, just because Taqoz has it built in. This was not planned but is nice. :-)

Sign In or Register to comment.