Go to advanced search

by LdB
Wed Apr 24, 2019 1:57 pm
Forum: Bare metal, Assembly language
Topic: Error on set Palette - 8 bit Framebuffer
Replies: 3
Views: 74

Re: Error on set Palette - 8 bit Framebuffer

Calling testPallete() ... prints successful for me and changes the colour :-) Change the two defines at top to suit Pi model You may already have some functions by the sounds but I thought I might as well give you all of it. #include <stdint.h> #define PIBASEADDR 0x3F000000 // Change to 0x20000000 f...
by LdB
Tue Apr 23, 2019 5:39 pm
Forum: Bare metal, Assembly language
Topic: Error on set Palette - 8 bit Framebuffer
Replies: 3
Views: 74

Re: Error on set Palette - 8 bit Framebuffer

The palette must have to be spaced out r,g, b, A on seperate message values which is obvious because of the minimum 24 byte request It says ===> Length: 24..1032 see this is minimum 1 palette entry request u32 0x?? // offset: first palette index to set (0-255) 4 bytes u32 0x1 // number of palette en...
by LdB
Sun Apr 21, 2019 2:40 pm
Forum: Bare metal, Assembly language
Topic: VMSAv7 virtual memory
Replies: 0
Views: 58

VMSAv7 virtual memory

Just setting up a VMSAv7 short descriptor for virtual memory like we do on AARCH64 but just need check a couple of things because the terminology is different. So I have got a 4096 section table entries each of 1Mb for my 1:1 mapping on TBBR0 .. so that TLB is 4GB of address space I have 2MB of 2 le...
by LdB
Sun Apr 21, 2019 3:51 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

You actually have it working .. mouse reports are only 4 bytes. I think the status doesn't probably work because you don't send it, I queried that above because the spec says nothing about it. When you get a NAK it just gives you the last 4 bytes from the previous report back the spec says that. So ...
by LdB
Sat Apr 20, 2019 10:16 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

I tried with OUT packet it didn't work. I didn't mean to offend you earlier, excuse me If you felt that way. No not offended I just thought you were ignoring the obvious way it reads. As I said if I am wrong so be it. Throw up the code and i will have a look :-) I still think you have it almost rig...
by LdB
Sat Apr 20, 2019 7:28 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

I think you have misinterpreted it. What I understood is when you need to send data then issue OUT packet on the bus with devive and endpoint address. If device gets this packet correctly it issues ack. Next time it expects the DATA packet from host. Buffer it is talking about is out buffer which i...
by LdB
Sat Apr 20, 2019 12:47 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

I agree with you that the STALL on the HID is saying it does not support HID report getting from control message. The fact you are getting an ACK after a couple of polls tells you that your poll code is correct. Now change the request after ACK to OUT not IN (IN = POLL) ... I know it's the wrong dir...
by LdB
Thu Apr 18, 2019 7:42 am
Forum: Graphics programming
Topic: SPi Display Questions?
Replies: 22
Views: 932

Re: SPi Display Questions?

Two 40 pin headers and short length of 40 pin ribbon ... problem solved :-)
Any old IDE cable is 40 pin and correct but may be too long to drive.
Image
by LdB
Thu Apr 18, 2019 5:47 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Endpoint address versus device address ... they are not the same. A device address can have many many endpoint addresses :-) . Or can we directly use existing HidGetReport function? You can try that first when you get an ACK .. if it doesn't then do the OUT method. I am not sure and it isn't covered...
by LdB
Thu Apr 18, 2019 3:01 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Nope its working exactly right from what I am reading .. I think you got it :-) https://www.beyondlogic.org/usbnutshell/usb4.shtml Upon successful reciept at the host, the host will return an ACK. However if the data is corrupted, the host will return no status. If on the other hand an interrupt con...
by LdB
Wed Apr 17, 2019 1:05 am
Forum: Bare metal, Assembly language
Topic: LdB's mailbox_tag_message funtion usage
Replies: 4
Views: 213

Re: LdB's mailbox_tag_message funtion usage

What is hard about 0x00010007 lets do 8 clocks you choose the clock data size you want and provide the buffer. tag: 0x00010007 request length : 0x0 response length: 0x20 (Some buffer size you are prepared to take I have chosen 32 bytes which will be 8 clocks) response buffer 0 : 0x0 response buffer ...
by LdB
Wed Apr 17, 2019 12:04 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

At a quick glance I thought it was just the same as the control message but you leave out the setup phase and possibly status. So in "HcdSumbitControlMessage" in CSUD it does setup, data, status (start line 499) they are marked "// Setup" "// Data" "// Status". I have the same function and clear mar...
by LdB
Mon Apr 15, 2019 9:35 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Ok it looks like the problem on these device is the interrupt endpoint has to be polled at least once and prefers on the given descriptpr period, which CSUD doesn't do. A lot of devices take the polling loosely but obviously not these ones. Iook at interrupt transfers here. https://www.beyondlogic.o...
by LdB
Mon Apr 15, 2019 12:25 am
Forum: Bare metal, Assembly language
Topic: Multicore playzone
Replies: 2
Views: 155

Re: Multicore playzone

4 core Switcher now with MMU, the combining of AARCH64 and AARCH32 code into a single file for consistency was ugly when I do the write up I will clean it up.
by LdB
Sun Apr 14, 2019 1:42 am
Forum: Bare metal, Assembly language
Topic: LdB's mailbox_tag_message funtion usage
Replies: 4
Views: 213

Re: LdB's mailbox_tag_message funtion usage

Most of that code at 571 does not actually deal with the specification that is still up to the data being entered in the variadic being correct. If you enter wrong data it would still fail. As per a good suggestion from eco747 I have also amended the buffer line for size safety The original code jus...
by LdB
Sat Apr 13, 2019 6:31 pm
Forum: Bare metal, Assembly language
Topic: Multicore playzone
Replies: 2
Views: 155

Multicore playzone

So I have finally got time to start my play around series on multicore concepts it is strictly a no Pi1 zone. Apparently I am an absolute beginner so the code is as is where is but I am sure a pro will be along to write a better one. So step1 is up the 4 core AARCH32 and AARCH64 task switcher comes ...
by LdB
Sat Apr 13, 2019 3:18 pm
Forum: Bare metal, Assembly language
Topic: Yet Another Bare Metal Tutorial for the RPi3
Replies: 74
Views: 40188

Re: Yet Another Bare Metal Tutorial for the RPi3

Well happy to be the total beginner that got everything working ... where is your code pro? I stopped working on it 5 months ago because it became obvious the main project had gone into hibernation you know about the time I posted issues :-) I could tell you what that was all about and where the cod...
by LdB
Fri Apr 12, 2019 3:06 pm
Forum: Bare metal, Assembly language
Topic: Yet Another Bare Metal Tutorial for the RPi3
Replies: 74
Views: 40188

Re: Yet Another Bare Metal Tutorial for the RPi3

Leaving aside it is all my fault that I can't use git and help them and it is an academic project so we should not expect weekly updates. Ultimately I have running code the site doesn't, it is no issue to me and not my problem to fix. The last site commit was 7 months ago ( brylow committed on Oct 2...
by LdB
Thu Apr 11, 2019 4:01 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Okay good we are on same page and I have an optical mouse that does exactly the same, so if you need help I can. I have a batch of other mice that all work but this one sucker wont give up its HID data even though the device itself enumerates. So if you want a second set of eyes just setup code on a...
by LdB
Thu Apr 11, 2019 2:24 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

AFAIK the reason for the stall from device for that last case was the descriptor asked for was invalid. Ask for any valid descriptor and from what has been said the device will give it to you .. so can you confirm that zeoneo. I believe we can confirm that you also have another low speed device (Kbd...
by LdB
Wed Apr 10, 2019 8:32 am
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

You need to be careful https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-endpoints-and-their-pipes Every USB device must provide at least one control endpoint at address 0 called the default endpoint or Endpoint0. This endpoint is bidirectional. that is, the host can send data to ...
by LdB
Tue Apr 09, 2019 11:30 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

I am wondering how come keyboard is working in REPORT mode with the same code which is not reading all the descriptors and hence not fully enumerating device? Remember a device is allowed to have multiple HID's on the single device and they will all queue up to be enumerated at endpoint 0 just like...
by LdB
Tue Apr 09, 2019 6:09 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

Yes but they won't communicate properly until they are fully enumerated. The device is enumerated that is why you can talk to device but the HID has not finished enumeration it is like a device on a device. No HID no HID reports !!!!! There are steps required to enumerate you notice on the device yo...
by LdB
Tue Apr 09, 2019 1:32 pm
Forum: Bare metal, Assembly language
Topic: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes
Replies: 45
Views: 2137

Re: Alignment issues in porting CSUD for RPI 3B (32 Bit) with minimal changes

https://wiki.osdev.org/USB_Human_Interface_Devices Should just require this which is all Circles HID config really does "SetProtocol" request Assuming a USB HID device supports the boot protocol, as explained in the section above, where is has a class value of 3 and a sub-class value of 1, the drive...
by LdB
Tue Apr 09, 2019 4:40 am
Forum: C/C++
Topic: Low voltage detection
Replies: 7
Views: 1639

Re: Low voltage detection

That is essentially what is done here using a simple ADC

https://raspi.tv/2013/controlled-shutdo ... -cell-lipo

Go to advanced search