Involved in the synthesis of meso-diaminopimelate (m-DAP or DL-DAP), required for both lysine and peptidoglycan biosynthesis. Catalyzes the direct conversion of tetrahydrodipicolinate to LL-diaminopimelate