logo elektroda
logo elektroda
X
logo elektroda

PY32F002 - Chinese ARM for 8 cents from PUYA

piotr_go 32232 77
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #61 20968014
    HwT
    Level 5  
    For the 8 pin (SOP8) PY32F002AL15S6TU, how would i flash this device? using J-link, USART RX/TX and PA14 ?
    This model does not have a boot0 mode, only reset/nrst button?
  • ADVERTISEMENT
  • #62 20968118
    piotr_go
    DIY electronics designer
    J-link SWD
  • ADVERTISEMENT
  • #63 20983264
    HwT
    Level 5  
    I'm trying to connect to the 8 pin (SOP8) PY32F002AL15S6TU via PuyaISP, but i cant really get it working, how should i enter the bootloader? I have tried pulling pin 6 (PA2/PF2-NRST) both high and low while power-cycling the MCU, but PuyaISP wont connect,

    Is pulling NRST high the correct method to enter the bootloader? This package does not have a dedicated BOOT0 pin,

    I have the option to try J-Link, does Puya have some tool to upload or read the mcu info via this? I have tried PuyaProgrammer but it can't find the USB device to use for SWD, For the J-link i'm using a nucleo board i have converted to J-link, but i belive Puya has its own programmer but it should be compatible ?
    SOP8 pin layout diagram for PY32F002AL15S6TU chip PuyaISP V1.0.1.7 interface with connection error.
  • #64 20983515
    piotr_go
    DIY electronics designer
    No BOOT0, no PuyaISP.
    J-link recipe in first post.
  • #65 21055304
    piotr_go
    DIY electronics designer
    I think they got ripped off with the price: :D
    Screenshot of a price table for RISC-V microprocessors.
    Comparison table of RISC-V (RV32IMAC) microcontroller specifications with various models and features, with USB functioning at 3-5V.
    RISC-V (RV32IMAC) 48MHz
    USB works with 3...5V supply. 👍
  • ADVERTISEMENT
  • #67 21055425
    piotr_go
    DIY electronics designer
    After all, I have inserted a price list.
  • #68 21055784
    Macosmail
    Level 35  
    An obvious mistake, and the MCU interesting. I've had them for a while now. They worked out at £2.16 apiece for me when I bought 50 at the end of 2023
    Image of a package of black integrated circuits covered with plastic wrap. .
  • #69 21056150
    piotr_go
    DIY electronics designer
    Aliexpress? At LCSC they only have QFN.
    It's a pity they didn't give a USB Host in the TSSOP20.
  • #70 21057260
    Macosmail
    Level 35  
    Yes Aliexpress.
    No, CAN is not present regardless of the housing is a small drawback. For that it has a curiosity PIOC which is an additional small 8 -bit core conceived to support various non-standard interfaces. Too bad it is limited to just two GPIOs. There is an example of the WS2812. Unfortunately this is programmed in ASM using external tools under Windows and then pasted in HEX into an appropriately allocated array, which becomes the program memory for this PIOC.
    There is also the impossibility of connecting a quartz (and any other clock signal):-) .
  • ADVERTISEMENT
  • #71 21057390
    piotr_go
    DIY electronics designer
    Macosmail wrote:
    It is also interesting not to be able to connect a quartz (and any other clock signal)

    Ooooooo, I hadn't noticed that.
  • #72 21341045
    stożek
    Level 11  
    I built the circuit from the website: https://github.com/flaviut/fan-controller.
    It is based on a 32f002a processor.
    I have a blue pill j-link clone but something i can't program it?
    Any ideas - I connect +3.3V (or 5) gnd and sclk and sdo according to the pins and still get the message
    J-Flash V8.10k error when attempting to connect to a device. .
    The circuit is like this
    Close-up of a PCB with components and a visible F002A 1529 chip.
  • #73 21341265
    piotr_go
    DIY electronics designer
    Have you tried programming the processor itself?
  • #74 21341448
    stożek
    Level 11  
    piotr_go wrote:
    Tried to program the processor itself?
    .
    Yes, but I wonder if it's not a problem with the power supply voltage - jlink bluepill gives 3.3V and this puya jets 5V ( although in the datasheet it says that it is from 1.7V but I guess that's only ports ?)
    Generally maybe it's a problem with reset - 8-pin version doesn't have it ?
    In general, I got very discouraged with puya - compared to it, a regular stm32 is a piece of cake when programming.
  • #75 21341486
    piotr_go
    DIY electronics designer
    I had no problems with programming at 3V3.
    Reset pin 6.
    Post the schematic in some kind of graphical format. I don't have kicad at hand.
    Didn't you program it with something before? Maybe locked.
  • #77 21341761
    piotr_go
    DIY electronics designer
    Looks OK. Don't you have some kind of short circuit?
    Maybe try with a low reset on power up, let it go when you click programming.
  • #78 21342713
    stożek
    Level 11  
    piotr_go wrote:
    Looks OK. Don't you have some kind of short circuit?
    Maybe try with a low reset at power up, let it go when you click programming.
    .
    After many buoys it is now working - I used a tut from here:
    https://www.eevblog.com/forum/microcontroller...324kb-more-peripherals/msg5464000/#msg5464000
    It's a bit weird talking over telnet like that, but all in all, the important thing is that it works.
    And the bone on the board was bricked - straight to the bin!

Topic summary

The discussion revolves around the PY32F002 and PY32F003 microcontrollers from PUYA, which feature an ARM Cortex M0+ core and are priced at 8 cents and 16 cents, respectively. Users express interest in purchasing these microcontrollers, with links provided to suppliers like LCSC. The PY32F002 offers 20kB FLASH and 3kB RAM, while the PY32F003 includes additional features like DMA and more timers. The microcontrollers support various interfaces (SPI, USART, I2C, ADC) and have a power supply range of 1.7V to 5.5V. Users discuss programming methods, compatibility with STM32, and the availability of development tools. There are also mentions of challenges in programming and documentation access, particularly for the QFN package. Overall, the conversation highlights the growing interest in low-cost ARM microcontrollers and their potential applications.
Summary generated by the language model.
ADVERTISEMENT