Recent Posts

Pages: [1] 2 3 4 5 6 ... 10 Next
1
Microcontrollers / STM32H7 CortexM4 USART DMA issue
« Last post by Diego_2024 on Today at 10:32:11 am »
I'm trying to use USART + RTS only + DMA(non circular, peripheral to memory, DMA1 Stram0) on STM32H755ZIT6's M4 processor. I and D caches are enabled on M7. My code is working on M7 but it does not works on M4.

// u8* dma_rx_buffer_ = (u8*)((u32)0x24000000);
// u8* dma_rx_buffer_ = (u8*)((u32)0x38000000);
u8* dma_rx_buffer_ = (u8*)((u32)0x30000000);

int main(void)
{
    //SCB_InvalidateDCache_by_Addr((u32*)dma_rx_buffer_, 14);
    error = HAL_UART_Receive_DMA(&usart2_dma_, dma_rx_buffer_, 14);
}

as you can see I'm setting RAM_D2's address to the dma_rx_buffer_, but I can't use SCB_InvalidateDCache_by_Addr on M4.

This is M7's Flash.ld

MEMORY {   
         RAM_D1 (xrw)   : ORIGIN = 0x24000000, LENGTH =  512K
         FLASH   (rx)   : ORIGIN = 0x08000000, LENGTH = 1024K
         DTCMRAM (xrw)  : ORIGIN = 0x20000000, LENGTH = 128K
         RAM_D2 (xrw)   : ORIGIN = 0x30000000, LENGTH = 288K
         RAM_D3 (xrw)   : ORIGIN = 0x38000000, LENGTH = 64K
         ITCMRAM (xrw)  : ORIGIN = 0x00000000, LENGTH = 64K
      }

this is M4's Flash.ld

MEMORY
    {
       FLASH (rx)     : ORIGIN = 0x08100000, LENGTH = 1024K
       RAM (xrw)      : ORIGIN = 0x10000000, LENGTH = 288K
       //RAM_D2 (xrw)   : ORIGIN = 0x30000000, LENGTH = 288K
       //RAM_D3 (xrw)   : ORIGIN = 0x38000000, LENGTH = 64K
    }

I also tried to add RAM_D1 and RAM_D2 inside M4's Flash.ld file and use it like this `attribute ((section(".RAM_D2"))) attribute ((aligned (32))) u8* dma_rx_buffer_;

but no result.

I also read DMA is not working on STM32H7 devices, but can't find solution.

P.S all configurations, including DMA are correct .

Also when I'm setting different addresses for dma_rx_buffer_ then I'm getting different data.

Do I need to add MPU region for CortexM4?

Update: Configured MPU region accrding DRAM addresses, but no result, with RAM_D1, RAM_D2 or RAM_D3.

/* Disable fault exceptions */
SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk;

/* Disable the MPU and clear the control register*/
MPU->CTRL = 0;

MPU->CTRL = MPU_PRIVILEGED_DEFAULT | MPU_CTRL_ENABLE_Msk;

SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk;

__DSB();
__ISB();

MPU->RNR = MPU_REGION_NUMBER8;

//MPU->RBAR = 0x24000000;
//MPU->RBAR = 0x38000000;
MPU->RBAR = 0x30000000;
MPU->RASR = ((uint32_t)MPU_INSTRUCTION_ACCESS_ENABLE << MPU_RASR_XN_Pos)   |
            ((uint32_t)MPU_REGION_FULL_ACCESS << MPU_RASR_AP_Pos)   |
            ((uint32_t)MPU_TEX_LEVEL0 << MPU_RASR_TEX_Pos)  |
            ((uint32_t)MPU_ACCESS_SHAREABLE << MPU_RASR_S_Pos)    |
            ((uint32_t)MPU_ACCESS_CACHEABLE << MPU_RASR_C_Pos)    |
            ((uint32_t)MPU_ACCESS_BUFFERABLE << MPU_RASR_B_Pos)    |
            ((uint32_t)0x00 << MPU_RASR_SRD_Pos)  |
            ((uint32_t)MPU_REGION_SIZE_32B << MPU_RASR_SIZE_Pos) |
            ((uint32_t)MPU_REGION_ENABLE << MPU_RASR_ENABLE_Pos);

What else can I do?  |O |O
2
Beginners / Re: Automatic golf ball dispenser
« Last post by soldar on Today at 10:30:29 am »
The reason why I want to move away from the leaver is that it moves the bucket. Gradually over time which means it loses alignment with the tee.
Make a base that holds the tee and the dispenser in place? Or just secure the dispenser in place?

And I hate it when people come in and propose a microcontroller for something which very clearly does not require a microcontroller at all. It's like someone with a hammer looking for nails to pound.
3
What's wrong with the tl494?
4
Beginners / Re: Why are thermal jumpers so expensive?
« Last post by Doctorandus_P on Today at 10:28:53 am »
Next question:

What are the most common ceramics used for SMT resistors?

It looks like AIN is a fairly common ceramic for thick film stuff.
5
Test Equipment / Re: Choosing between entry-level 12-bit DSOs
« Last post by shapirus on Today at 10:20:09 am »
this is +1 imho in rigol, lets not forget, the 2 scopes discussed here got pros and cons.
Since the Siglent can into 2 Gsa/s, it could potentially be modded to support at least 800 MHz single-channel bandwidth, if there are no further limitations in digital signal processing and/or software. I don't recall anyone mentioning or trying this though.
6
Hello , there is a basic confusion I have.

We have a mosfet with 24V drain its VGS i getting plugged with 15V floating from  DB02S2415A floating difference.

But in my configuration as you see the drain of the power amplifier is the source of the mosfet.



So on one side we have the floating value of GIZ but on the other hand you said i should connect to the same node 24V to 20V converter I will try to build.

So we are connecting two different voltage potentials on the same node.

Arent they going to conflict which other?

Thanks.
7
Beginners / Re: Analog Multiplexer-Demultiplexer Switch Vs Input Voltage
« Last post by tggzzz on Today at 10:17:43 am »
P.S. If anyone understand the reason that at Nexperia's datasheet referred the term Vsw (or the Vsw is the same thing with Vis in essence?) and if there is any practical purpose of it... please tell it.

Sloppyness is a sufficient explanation. The Nexperia datasheet also uses Vcc and Vdd interchangeably. That's sufficient for me to avoid Nexperia where possible.

The onsemi datasheet is better than the TI datasheet which is in turn better than the Nexperia datasheet.
Onsemi is American; was Motorola.
Nexperia is Chinese; was Philips.
TI is American, and always was TI.
8
I have been giving this some thought. I was thinking of buying a 12 v SEAFLO Electric Marine Bilge Pump, 350 or 500 GPH and I might still buy one as it is something always useful to have around.
https://www.amazon.com/dp/B07FNY3YRT/
https://www.amazon.com/dp/B07FP85QVB/

But then I thought I might be able to use the suction of the main pump itself. With the pump not working the bilge is, naturally at lower level and pressure but with the pump suction it is very possible it will suck the water from the bilge. (red line in the diagram attached) This has the advantage of not needing an extra pump but it requires
(1) check valve to ensure water cannot flow in reverse from pump down to the sump
(2) valve to shut off the red line and open ONLY when there is water in the sump, otherwise air will get into the system

All in all an extra pump might make more sense. Safer and simpler.

I am still thinking about this.
9
Test Equipment / Re: Choosing between entry-level 12-bit DSOs
« Last post by shapirus on Today at 10:16:46 am »
not everybody like to connect to network for a mere screen capture, i do it with usb stick. my ethernet cable is super long and its quite a mess trying to run it to my dso, at my lab setup, connecting to usb cable is much easier. and that luckily i have ethernet cable at all so i can do some adb hack albeit a bit inconvenience. ymmv.
Well, installing a modded apk already requires a certain level of involvement, way beyond a normal user's one, and of course there's a certain learning curve. Disabling apk signature verification is not much farther than that (especially since a respective modded .jar that can be used without having to build your own is available).

So there's not much more work to do if you want to retain the screenshot functionality after you already know how to change stuff on the file system and install a modded apk (or even rebuild your own).

The overall point is that such mods are possible and they don't require top hacker skills or hardware modifications (not even connecting via the serial port). But opening the case may be necessary: before changing anything on the android file system(s), it is highly recommended to take a backup of the internal SD card to have an image that you can restore to if something goes wrong.

p.s. a significant "+1" for Rigol is that its software is stored on a standard micro SD card. This is great not only for modding, but for creating and restoring backups. But where is the data stored on the Siglent? Some soldered-in flash storage chip?
10
Other Equipment & Products / Re: Ersa Desoldering-Station
« Last post by jasom on Today at 10:15:04 am »
Can be used i-Con 1 with x-tool and cu100a? or with chip tool desolder tweezers? Thank You
Pages: [1] 2 3 4 5 6 ... 10 Next