Go to advanced search

by LdB
Mon Jul 19, 2021 1:13 pm
Forum: C/C++
Topic: Understanding Low Level SPI communications [Help]
Replies: 7
Views: 404

Re: Understanding Low Level SPI communications [Help]

What you have not shown is what you put in the buffer before you begin clocking You state you understand how an SPI works but without seeing the MOSI or what you put in the buffer we have no idea what is coming out the MISO because we can only hope you set SGL/DIFF, D2, D1, and D0 bits right ..... I...
by LdB
Mon Jul 19, 2021 4:02 am
Forum: Bare metal, Assembly language
Topic: Assembly IDE
Replies: 32
Views: 1082

Re: Assembly IDE

Clearly we are all out busy building our industrial products with our Pi's and waiting for your code and assistance and for my part I am out of here <wave>.

So I leave it your expertise to help the OP out with something constructive and get the post back on subject.
by LdB
Mon Jul 19, 2021 2:29 am
Forum: Bare metal, Assembly language
Topic: Assembly IDE
Replies: 32
Views: 1082

Re: Assembly IDE

Not sure your I get your point, I know a couple of companies that have a product that sells 100% into the Industrial market they do however sell only a handfull of units.
by LdB
Mon Jul 19, 2021 2:13 am
Forum: Bare metal, Assembly language
Topic: Assembly IDE
Replies: 32
Views: 1082

Re: Assembly IDE

Not sure Gavin it is a industry joke about using SBC's where they shouldn't and your chances of getting approvals for it would be zero.

I do like the Pi but it isn't even a measurable percentage of the Industrial market and why I found the comment funny.
by LdB
Mon Jul 19, 2021 1:59 am
Forum: Bare metal, Assembly language
Topic: Assembly IDE
Replies: 32
Views: 1082

Re: Assembly IDE

Must be all those ventilators running on Pi4 computers in Columbia :-)
by LdB
Sun Jul 18, 2021 11:27 am
Forum: Bare metal, Assembly language
Topic: Assembly IDE
Replies: 32
Views: 1082

Re: Assembly IDE

You are coding on a niche education and hobbiest SOC board ... what did you expect? To answer your rant and question ... the blindly obvious. Many volunteers spent hours of dev time for free to get even what is available so how about you spend some time and develop what you desire for everyone else.
by LdB
Sun Jul 18, 2021 10:17 am
Forum: Bare metal, Assembly language
Topic: Assembly IDE
Replies: 32
Views: 1082

Re: Assembly IDE

I know but what I found is mostly stuff for development board and that don't help me at all. I need a tool running on the Pi because I work on software which is running on the Pi and other single board computers. If your development is tied that closely to Pi hardware how do you expect to adapt as ...
by LdB
Sun Jul 18, 2021 4:50 am
Forum: Bare metal, Assembly language
Topic: Assembly IDE
Replies: 32
Views: 1082

Re: Assembly IDE

If you are only doing small stuff several of the big commercial compiler suppliers do trial/freebies you might squeeze into ARM Keil DS5, IAR workbench and GreenHills Software That is why when doing this commercially we buy compilers/assemblers because it saves hours of time, the payback is very fast.
by LdB
Fri Jul 16, 2021 11:51 pm
Forum: C/C++
Topic: SPI chip select active high
Replies: 7
Views: 916

Re: SPI chip select active high

The code is approximately right the only major issue I see is no lock mechanism to stop overruns I don't use the PI library they provide I use the stock standard linux If it helps I here is an example I did for user on the forum for the SSD1327 SPI screen on the Pi https://github.com/LdB-ECM/SSD1327...
by LdB
Sat Jul 10, 2021 4:55 pm
Forum: C/C++
Topic: SPI chip select active high
Replies: 7
Views: 916

Re: SPI chip select active high

You might want to try

Code: Select all

  spi.tx_buf =(unsigned long)&spiBufTx[0];
  spi.rx_buf =(unsigned long)&spiBufRx[0];
by LdB
Sun Jul 04, 2021 3:36 am
Forum: Bare metal, Assembly language
Topic: [Solved] Different arrow key sequences between PL011 and mini UART?
Replies: 5
Views: 448

Re: Different arrow key sequences between PL011 and mini UART?

What the man ^^^ said on the PL011 you read a character unless the RXFE flag is set because there is stuff in the FIFO
by LdB
Sun Jun 20, 2021 2:08 pm
Forum: C/C++
Topic: atomic or volatile, that is the question ( Whether 'tis nobler in the mind to mutex them)
Replies: 74
Views: 2943

Re: atomic or volatile, that is the question ( Whether 'tis nobler in the mind to mutex them)

Don't be lazy google "hardware synchronized multi-core processor" Where I first ran across it was with Xilinx FPGA soft cores where the designer used a "xilinx mutex" https://www.xilinx.com/products/intellectual-property/mutex.html Dates back to the old microblaze softcore. NXP a...
by LdB
Sun Jun 20, 2021 1:11 pm
Forum: C/C++
Topic: atomic or volatile, that is the question ( Whether 'tis nobler in the mind to mutex them)
Replies: 74
Views: 2943

Re: atomic or volatile, that is the question ( Whether 'tis nobler in the mind to mutex them)

will that require a volatile additionally to _Atomic? (this is actually why I used volatile so far) As I said hardware locks and cluster locks have the issue ... atomicity has zero to do with optimizer visibility. Volatile is an instruction to the optimizer to stay out of it Currently depending on ...
by LdB
Sun Jun 20, 2021 6:55 am
Forum: C/C++
Topic: atomic or volatile, that is the question ( Whether 'tis nobler in the mind to mutex them)
Replies: 74
Views: 2943

Re: atomic or volatile, that is the question ( Whether 'tis nobler in the mind to mutex them)

I am not getting involved in yet another long winded ridiculous discussion so I will keep this brief. At the end of the day you are dealing with a lock primitive and there are very limited ways to do it on a given CPU architecture, the language is just a construct to the assembler code you need. dsy...
by LdB
Sat Jun 12, 2021 3:22 am
Forum: C/C++
Topic: Schrödinger's Code - Undefined behavior in theory and practice
Replies: 85
Views: 4426

Re: Schrödinger's Code - Undefined behavior in theory and practice

Even in the embedded system world we mostly see people using GCC or whatever. Not anything the hardware vendor created. You are clearly not in the embedded market or you would not make that comment and further discussion is thus pointless. Actually, I would really like you to tell what programming ...
by LdB
Fri Jun 11, 2021 3:19 pm
Forum: C/C++
Topic: Schrödinger's Code - Undefined behavior in theory and practice
Replies: 85
Views: 4426

Re: Schrödinger's Code - Undefined behavior in theory and practice

x = y + z; That is signed addition and there are multiple things that can happen on different CPU's and DSP's if it rolls It will remain undefined in C as a common implementation on all CPU cores can't be done they don't have the traps in silicon to do it Even if the C standard board made the standa...
by LdB
Tue Jun 08, 2021 4:15 pm
Forum: C/C++
Topic: Schrödinger's Code - Undefined behavior in theory and practice
Replies: 85
Views: 4426

Re: Schrödinger's Code - Undefined behavior in theory and practice

I think most programmers would simplify it to

If I wanted to drive a crash proof slow Volvo compiler I would buy one, I prefer the freedom and speed and trust in my ability to not crash the compiler.
by LdB
Tue Jun 08, 2021 4:01 pm
Forum: C/C++
Topic: Schrödinger's Code - Undefined behavior in theory and practice
Replies: 85
Views: 4426

Re: Schrödinger's Code - Undefined behavior in theory and practice

Appendix J of the standard, C11 has 199 undefined behaviours and some are vital they be there. There are more than that but those are the important ones that are tracked in implementation. The article didn't tell you why undefined behaviours exist and why we won't close them ... you see they have an...
by LdB
Tue Jun 08, 2021 11:16 am
Forum: C/C++
Topic: Schrödinger's Code - Undefined behavior in theory and practice
Replies: 85
Views: 4426

Re: Schrödinger's Code - Undefined behavior in theory and practice

Linux and Windows like most modern O/S over commit memory so even if a malloc works it doesn't mean much other than congratulations you got a pointer. This whole thread is just random generalizations and sheds little light on anything meaningful and I love the concept of "correct c++ code"...
by LdB
Sat May 22, 2021 1:52 am
Forum: Bare metal, Assembly language
Topic: µs Timing with Pi 4
Replies: 7
Views: 1512

Re: µs Timing with Pi 4

It's been discussed many times isolcpu doesn't stop the scheduler interrupts on that core that requires you to remove the core from the scheduler ... to get a totally free core you have to recompile the source (All discussed here https://lwn.net/Articles/816298/). At best it makes the interrupt prob...
by LdB
Thu May 20, 2021 3:28 am
Forum: Bare metal, Assembly language
Topic: µs Timing with Pi 4
Replies: 7
Views: 1512

Re: µs Timing with Pi 4

The best layman way was given here but you will ocassionally get caught with interrupt delays https://raspberrypi.stackexchange.com/questions/8586/arm-timer-in-kernel-module-with-precision-less-than-microsecond The only way to do it with turning off the interrupts is via a kernel driver ... discusse...
by LdB
Sun May 16, 2021 10:08 am
Forum: Bare metal, Assembly language
Topic: Choosing Kernel Address ??
Replies: 5
Views: 1080

Re: Choosing Kernel Address ??

The default is simply that which was chosen by linux groups doing ARM port ... as that is the normal target for the Pi it defaults to that. As to the argument why it is that you would need to hit the ARM linux development forum.
by LdB
Mon May 03, 2021 2:18 pm
Forum: C/C++
Topic: Double value give me different print, why?
Replies: 8
Views: 423

Re: Double value give me different print, why?

Use a uint64_t from <stdint.h> The time in epoch microseconds = (epoch time seconds * 1000000) + microseconds uint64_t max count is 18,446,744,073,709,551,615 There are 31,536,000 seconds in a normal year 31,622,400 seconds in a leap That translates to 31,536,000,000,000 usec in a normal year 31,622...
by LdB
Sun May 02, 2021 9:59 am
Forum: Bare metal, Assembly language
Topic: How to change the len in FPSCR? [SOLVED]
Replies: 10
Views: 1265

Re: How to change the len in FPSCR?

Usually same deal in user-space FPU mode would typically be disabled (unless Raspbian is unusal).. you would need to install a device driver. You need to remember linux is doing context switches on which the FPU is part of the saved context registers. So different tasks will have the FPU on or off a...

Go to advanced search