Quantcast
Channel: PSV window, multiple page access for large arrays in flash?
Browsing latest articles
Browse All 34 View Live

PSV window, multiple page access for large arrays in flash? (Cypress)

I'm working with a PIC24EP512MC microcontroller with XC16 compiler.  As the part number indicates, the device has 512KB of flash/program memory.  I want to be able to save as many as 10 large arrays...

View Article



Re: PSV window, multiple page access for large arrays in flash? (NKurzman)

compiler-managed PSV window (auto_psv space)the PSV window is 32KB There you go.  the compiler will manage a singe 32K page.More than that you have to set the PSV register to you page.  note once you...

View Article

Re: PSV window, multiple page access for large arrays in flash? (flubydust)

The complier will manage the PSV for you. Give the arrays a space(psv) attribute and the arrays and pointers into them __psv__ decorations. Don't give interrupt handlers no_auto_psv attributes if they...

View Article

Re: PSV window, multiple page access for large arrays in flash? (NKurzman)

So if you create Const arrays bigger than 32K the Compiler will handle it automatically?That will be handy.

View Article

Re: PSV window, multiple page access for large arrays in flash? (balmerjd)

No, the compiler can handle multiple 32k pages of memory but only access them one at a time, and no one variable/array/"object" can be larger than 32k.  So you could have 10 arrays that were 32k or...

View Article


Re: PSV window, multiple page access for large arrays in flash? (flubydust)

NKurzmanSo if you create Const arrays bigger than 32K the Compiler will handle it automatically?That will be handy.I am pretty sure you can but you have to add -mlarge_arrays (or something like that)...

View Article

Re: PSV window, multiple page access for large arrays in flash? (Cypress)

balmerjdNo, the compiler can handle multiple 32k pages of memory but only access them one at a time, and no one variable/array/"object" can be larger than 32k.  So you could have 10 arrays that were...

View Article

Re: PSV window, multiple page access for large arrays in flash? (DarioG)

I'd say that you can have multiple single objects as large as 32KB or so. Only used them a little, so not sure...

View Article


Re: PSV window, multiple page access for large arrays in flash? (RISC)

Hi,I recommend that you check the XC16 Compiler manual.If I remember well it was recently updated (last XC16 compiler version) with examples and specific sections about PSV / EDS usageRegards

View Article


Re: PSV window, multiple page access for large arrays in flash? (flubydust)

CypressIf I can actually save multiple 25KB constant arrays in flash, can someone please provide a brief example of how to do that complete with compiler options and memory model settings? const int...

View Article

Re: PSV window, multiple page access for large arrays in flash? (balmerjd)

Ok, after re-reading the section on PSV memory in the XC16 compiler (Ver. 1.23) this is my take.__psv__ const char __attribute__ ((space (auto_psv))) array[x] = {...}You are limited to ONE 32k page of...

View Article

Re: PSV window, multiple page access for large arrays in flash? (RISC)

Hi, auto_psv means the compiler generates code in ISR to save / restore the original PSV page.If you don't access FLASH in the ISR, use no_auto_psv to avoid generating unnecessary save/restore PSV...

View Article

Re: PSV window, multiple page access for large arrays in flash? (flubydust)

balmerjdThe big thing is whether or not you need access to the data inside a interrupt or not. That part I was still somewhat unsure of exactly the ramifications of the auto_psv verse no_auto_psv...

View Article


Re: PSV window, multiple page access for large arrays in flash? (NKurzman)

flubydustIf the Interrupt is not using const data then can it be left to no_auto_psv or it needs to be auto_psv in this case? I inherited a PIC24 program where the flash data is copied to RAM, I would...

View Article

Re: PSV window, multiple page access for large arrays in flash? (flubydust)

NKurzmanIf the Interrupt is not using const data then can it be left to no_auto_psv or it needs to be auto_psv in this case?If you are sure yes, but, no_auto_psv only saves 4 instructions in the...

View Article


Re: PSV window, multiple page access for large arrays in flash? (NKurzman)

I could be desperate in the future.  Only future me would know.  But future me will appreciate past me finding this out now.

View Article

Re: PSV window, multiple page access for large arrays in flash? (balmerjd)

flubydustInterrupt handlers by default assume the PSV may not be pointing at auto_psv space and generate code to save the current PSV register, set it to point at auto_psv space and restore the PSV on...

View Article

Browsing latest articles
Browse All 34 View Live




Latest Images