Project

General

Profile

Actions

Task #559

closed

Garantir que la réception est désactive sur l'APBUART.

Added by Alexis Jeandet over 8 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Start date:
03/11/2015
Due date:
% Done:

0%

Estimated time:
revision:
r0

Description

Suite au keypoint FPGA nous avons décidé de fixer la PIN RXD de l'APBUART à '0' et ne pouvant garantir par design que cela ne pose pas de problème quand la réception est activée. Le soft de vol ne doit pas activer la réception sur l'APBUART. Il faut peut-être l'ajouter dans la SRS?

  1. Par design:
    • dans fsw_init.c:
          // UART settings
          send_console_outputs_on_apbuart_port();
          set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE);
          enable_apbuart_transmitter();
      
          DEBUG_PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n")
      
          PRINTF("\n\n\n\n\n")
      
    • dans DEV_PLE/src/fsw_misc.c:
      int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port
      {
          struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART;
      
          apbuart_regs->ctrl = APBUART_CTRL_REG_MASK_TE;
      
          return 0;
      }
      
      int enable_apbuart_transmitter( void )  // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register
      {
          struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART;
      
          apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE;
      
          return 0;
      }
      
      void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value)
      {
          /** This function sets the scaler reload register of the apbuart module
           *
           * @param regs is the address of the apbuart registers in memory
           * @param value is the value that will be stored in the scaler register
           *
           * The value shall be set by the software to get data on the serial interface.
           *
           */
      
          struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs;
      
          apbuart_regs->scaler = value;
          BOOT_PRINTF1("OK  *** apbuart port scaler reload register set to 0x%x\n", value)
      }
      

Au passage je ne vois pas trop l’intérêt d'appeler enable_apbuart_transmitter et send_console_outputs_on_apbuart_port.

  1. Pour la vérification sur cible:

Il faut lire le registre de contrôle de l'APBUART et vérifier le bit RE(Bit 0), celui-ci doit être à '0'.

APB UART CONTROL REGISTER

L'APBUART est à l'adresse 0x80000100 et l'offset du registre de contrôle est 0x8 donc l'adresse du registre de contrôle est 0x80000108.


Files

APBUART_CTRL_REG.png (422 KB) APBUART_CTRL_REG.png Alexis Jeandet, 03/11/2015 02:24 PM
Actions

Also available in: Atom PDF