Electronics > Microcontrollers

$0.11 PY32F002A: Cortex-M0+ MCU, actually a PY32F030! 32/4KB, 48MHz, PLL, DMA...

<< < (23/27) > >>

antst:

--- Quote from: true on October 12, 2023, 10:03:22 am ---
--- Quote from: man_anyone on September 06, 2023, 10:37:25 pm ---I'm really interested, so I would be glad if you told me where you're going

--- End quote ---

What I wrote is that I got it working. A progress report. For some reason "this one thing isn't working" is the only thing that was understood, and perhaps taken both as begging for help and an opportunity to hate on an IDE / platform. I never asked for help nor did I want help. The response was just "your choice sucks" and "use what was made before, it works." Has nothing to do with the progress report.

Really I was more interested in discussing the PY32F002B and if anyone did anything with it yet...

Since you're interested, if you don't mind waiting, I'll post the platformio conf file once I get done with a convention early November. This way I can make sure the config is repeatable and not specific to my setup. Shouldn't require doing any hacky stuff - just make a new project, use the config and PUYA .pack file. If you want it sooner let me know.

--- End quote ---

Kindly reminding! :)
I just got dev boards and going to start hacking around it. Would be nice to avoid some work with setting up platformi :)

bingo600:
Seems line Puya has gotten their "Device packs" in the "Official" DAP repos.

Install with:

pyocd pack update      - It will "barf a bit" but complete

pyocd pack install PY32

pyocd pack find PY32


--- Code: ---
  Part          Vendor   Pack                Version   Installed 
------------------------------------------------------------------
  PY32F002Ax5   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F002Bx5   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F003x4    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F003x6    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F003x7    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F003x8    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F030x4    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F030x6    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F030x7    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F030x8    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F031x4    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F031x6    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F031x7    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F031x8    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040Cx6   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040Cx8   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040Cx9   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040CxB   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040x6    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040x8    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040x9    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F040xB    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071Cx6   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071Cx8   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071Cx9   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071CxB   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071x6    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071x8    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071x9    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F071xB    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072Cx6   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072Cx8   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072Cx9   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072CxB   Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072x6    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072x8    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072x9    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F072xB    Puya     Puya.PY32F0xx_DFP   1.2.0     True       
  PY32F303x8    Puya     Puya.PY32F3xx_DFP   1.0.0     True       
  PY32F303xB    Puya     Puya.PY32F3xx_DFP   1.0.0     True       
  PY32F303xC    Puya     Puya.PY32F3xx_DFP   1.0.0     True       
  PY32F403xB    Puya     Puya.PY32F4xx_DFP   1.0.0     True       
  PY32F403xC    Puya     Puya.PY32F4xx_DFP   1.0.0     True       
  PY32F403xD    Puya     Puya.PY32F4xx_DFP   1.0.0     True       
  PY32L020x5    Puya     Puya.PY32L0xx_DFP   1.0.0     True       
  PY32M010x5    Puya     Puya.PY32Mxxx_DFP   1.0.0     True       
  PY32M030x8    Puya     Puya.PY32Mxxx_DFP   1.0.0     True       
  PY32M070xB    Puya     Puya.PY32Mxxx_DFP   1.0.0     True       


--- End code ---

1.2.0 Pack is here
https://www.puyasemi.com/uploadfiles/Puya.PY32F0xx_DFP.1.2.0.pack

/Bingo

bingo600:

--- Quote from: DavidAlfa on September 06, 2023, 01:10:34 pm ---It was a *** mess to set it up, but I got it working in Eclipse.

--- End quote ---

@David

I decided to "Fine tune" my PY32 ... And install an IDE to do debugging.

I tried the Cube IDE w. Jlink - I have a Chinese Jlink-OB.
Works a few times (Run to breakpoint) ... But after setting a breakpoint, and "resuming" a few times GDB/Segger/IDE crashes , saying it has run out of breakpoints.
I don't think my OB has Flash BP's licensed.
But i only have the BP at main , and the "other BP" active ...


I then installed Eclipse Embedded (w. Embsys) , and is using my AirF103 DAP-Link probe.
I'm having quite some debug issues here ...
PyOCD is  flashing "fine" (text show in red) ... Well it says flashing 3200 bytes , and the bin fills 3417 bytes  :-/O

The breakpoints seem to work , but the MCU isn't blinking the led ....
Crazy enough BP's work, and show the "loop" variable.

If i "just" press "Run" - the led isn't blinking too.

If i move the project to "makefile" , and still use dap-link to program
The led is blinking  |O

I'm in "deep do..do" here ...

Any hints would be much appreciated.

PC is x64 Mint 21.02

Attached Eclipse Project.

/Bingo

DavidAlfa:
My experience with pyOCD wasn't pretty good... it was a PITA to set up the CMSIS packs, Eclipse and all that, but I remember it working.
After making the Eclipse guide few posts back (Did it for a 100% legal alternative), I never used it again.
I'm running STLINK converted into JLink-OB with no problem else than the daily annoying warning.

You can only set 2 or 3 breakpoints, if you add more you'll have to delete or disable others.
Plus ensure to remove "Halt at main" in the debug launch options, as it will use another breakpoint.
I have no problem whatsoever with breakpoints, just remember they're finite! :)


BTW, these puyas have started to get more expensive, 2-4 cents more in small quantities!

bingo600:
I got Eclipse to compile & flash

I seem to have an issue with the clock init


--- Code: ---#if 0
  BSP_RCC_HSI_PLL48MConfig();
  SysTick_Config(480000);
#else
  LL_RCC_HSI_SetCalibFreq(LL_RCC_HSICALIBRATION_24MHz);
  while (LL_RCC_HSI_IsReady() != 1);
  SysTick_Config(24000);      // 24MHz cpu clock, 1ms period.
#endif

--- End code ---

If i set it at 48M ,  it runs super slow
If i use the 24M , it runs as expected ...

Hmmm .....

Isn't there a zero to much in that 48M systick ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod