qba667 / FlySkyI6

14 channels FW modifications for FlySky I6
GNU General Public License v3.0
287 stars 72 forks source link

Can I put the battery image back? #71

Closed Yudgin closed 4 years ago

Yudgin commented 6 years ago

Hello I have a question. Can I put the battery image back?

qba667 commented 5 years ago

@Yudgin - is is already discussed - now it is a little bit more complex because of different batteries but should be possible, after I will change it.

Yudgin commented 5 years ago

I use translator. I do not understand, tried to draw. The compiler writes "overlaps section .mod_code_65C8_68A7" Not enough memory? Can I remove the timers setting? This will help me? I need a global array. Where can I post? How much will it cost to complete work on i6x?

Yudgin commented 5 years ago

Like decided with memory. Where there is a timer there is a place. Tell me how to display information on the uart for debugging. sorry for my English

qba667 commented 5 years ago

@Yudgin You have to be careful where you adding your code. Removing some features helps a lot, you can also remove menus that you are not using. Global array in RAM or FLASH? Do you want to help with I6X I would say it is 2 months to get initial versions working. Later I will provide you addresses of uart methods.

Yudgin commented 5 years ago

I'm nice. Global array in RAM. I do not understand these matters. I want to display the coordinates on the UART. I want to keep a log of coordinates. Thank. How can I help I6X?

Yudgin commented 5 years ago

Hey. I remind of myself. "Later I will provide you addresses of uart methods."

qba667 commented 5 years ago

@Yudgin Here you have where, UART 2 is configured and DMA is being initialized (0x978):

signed int setupUART2()
{
  signed int result; // r0

  MEMORY[0x20000038] = 0x20000800;
  MEMORY[0x2000003C] = 0x20000800;
  MEMORY[0x20000040] = 0x20000800;
  MEMORY[0x40048034] |= 0x1000u;                // uart 2 enable
  MEMORY[0x4004D040] = 768;                     // PORTE_PCR16
  MEMORY[0x4004D044] = 768;                     // PORTE_PCR17
  MEMORY[0x4006C000] = 0;                       //  UART Baud Rate Register: High (UART2_BDH)
  MEMORY[0x4006C001] = 13;                      // UART Baud Rate Register: Low (UART2_BDL)
  MEMORY[0x4006C003] |= 0xACu;                  // UART Control Register 2 (UART2_C2) 
  MEMORY[0x4006C008] |= 0xA0u;                  // UART Control Register 4 (UART2_C4)
  MEMORY[0x40021000] = 0x87u;                   // DMA channel mutiplexer 0 
  result = 1073774848;
  MEMORY[0x40008104] = 0x4006C007;              // Destination Address Register (DMA_DAR0
  MEMORY[0x4000810C] = 0x20520080;              // DMA Control Register (DMA_DCR0)
  MEMORY[0x40021001] = 0x86u;
  MEMORY[0x40008110] = 0x4006C007;              // Channel Configuration register (DMAMUX0_CHCFG1)
  MEMORY[0x40008114] = 0x20000800;              //  Destination Address Register (DMA_DAR1)
  MEMORY[0x40008118] = byte_FFFF;               // DMA Status Register / Byte Count Register (DMA_DSR_BCR1)
  MEMORY[0x4000811C] = 0x601A0800;              // DMA Control Register (DMA_DCR1)DMA Control Register (DMA_DCR1)
  return result;

We have to check if DMA is not used for anything else when firmware is running. Memory adres must be also verified.

Yudgin commented 5 years ago

Congratulations on holidays. I honestly did not understand what to do.

Yenya commented 4 years ago

@Yudgin, do you still need to have the battery image? I think the voltage reading + the audible alarm which 1.7.6 has provides sufficient feedback on the battery state.

Yenya commented 4 years ago

This has been without response for several months now, I am closing this issue.